Do you need to get a user’s manager during your flow?
A common task might involve obtaining manager information for a specific employee, such as their name, email address, or other relevant details.
This can be incredibly helpful in streamlining communication and automating approval processes within your organization.
To achieve this goal, you can use the Office 365 Users Connector. The Office 365 Users Connector provides several features, including the ability to retrieve manager details for any user within your organization.
This post will show you how to add user manager information in AAD and then retrieve it within your Power Automate flows.
Key Takeaways
- Utilize Office 365 Users Connector to obtain manager information in Power Automate
- Manager details are stored in Azure Active Directory.
- A user’s manager can be set in the Properties for the user in AAD.
- This needs to be set in order for the Office 365 Users action to return the manager.
Adding Manager Details in Azure Active Directory
To add manager details, you’ll first need access to edit users in Azure Active Directory.
If you have access you can easily add or update a user’s manager.
- Go to the Users tab in AAD.
- Click on the user to which you wish to add or edit the manager.
- Click on the Edit properties tab for the user.
- Scroll down the list of available user fields and click on the Add manager option. This will open the Edit Manager pane on the right side.
- Search for the manager and click on them to add the user as the manager.
- Press the Select button when the user appears under the Selected items heading.
- Press the Save button to save the new manager for the user.
This way, you can seamlessly integrate manager details in your Power Automate flows.
How to Use the Office 365 Users Connector to Get Manager Details
To obtain manager details from AAD in Power Automate, you can utilize the Office 365 Users Connector.
This feature enables you to access user profiles in your organization to retrieve various information including a user’s manager’s profile.
- Add the Get manager (V2) from the Office 365 Users Connector.
- Add the User (UPN) of the user whose manager you want to return.
In the Get manager (V2) action, you will need to provide the User Principal Name (UPN) or Email ID for the user whose manager information you want to retrieve.
The UPN is essential for identifying a user in the Office 365 directory, and it usually takes the form of an email address.
If you don’t have the UPN, you can get this from the Search for users (V2) action by searching the user’s name. This will return all the user information including the UPN. Keep in mind this might return many users since a name is not unique.
Once you’ve entered the UPN or Email ID, the Office 365 Users Connector will return the manager’s profile, including their name, email address, and other relevant information.
You can then use this data in subsequent actions, such as sending an email or updating a SharePoint list.
Get Manager Name and Email from Output
After using the Get manager (V2) action you can get the manager’s name and email with dynamic content.
The Get Manager action will populate the manager’s information as dynamic content to be used later in the flow.
The Display Name dynamic content will return the full name of the manager, and the Mail dynamic content will return the email address.
Conclusions
This allows you to automate processes such as approvals, notifications, and more that require a user’s manager.
Using the Get Manager (V2) action from the Office 365 Users connector, you can easily retrieve a user’s manager information, including their email, name, and other relevant properties.
Keep in mind, Power Automate can only retrieve the manager information if it exists in Azure Active Directory, so this will need to be maintained diligently to make the most of the Office 365 Users connector.
Are you using the manager information in your flows? Let me know in the comments!
0 Comments