Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Office 365 User Get-Manager not working

I am trying to use the get manager function in Microsoft Flow with dynamic content from a user whom creates an item in a Sharepoint list. Our users have a different UPN than Email. The dynamic content surfaced from the "when an item is created in sharepoint" only give us username/email address, not UPN. The get manager function cannot resolve the users manager by email because the UPN does not match email, and it seems it uses the UPN to pull the manager. Does anyone have suggestions on how to get around this?



Community Support
Community Support

Hi Roberts,


Get-Manager is tied to your Azure directory and not sharepoint online and I think that is why you cannot get manager using the dynamic content extracted from SharePoint trigger. You could try to add a column with the user principal name shown in Azure AD and filled in below field to test if this could work.





Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-monli-msft I understand how it works, why cant you guys give us the ability to surface the UPN through the dynamic content instead of just the email address? Sharepoint online is aware of UPN.

I can not be the only one that uses a different UPN vs. Email address that needs an approval workflow to work. The simple fix is to add UPN as a dynamic field that surfaces from the sharepoint "when item is" actions.

Hi @Roberts2727,


Sorry for the inconvenience. You could post this to the idea forum so that the pg will consider this in the future release.




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This should be considered a bug as it cuases the service not to function as intended and the flows to error out. Not a product suggestion.

Was this ever resolved? I am facing the same issue

No, I made multiple attempts to work with MS employees to get a fix but each one was ignored ultimately. 

Not applicable

Wow, this is kind of a joke. Because you NEVER want to change the users upn and that is what MS suggests when they want us to use email in Flow. Because people change primary email in a company, whether they marry or change department or other reason, and changing upn is a mess.

New Member



I solved this issue using the task Search For User and passing Created By Email to return only one user.

After that you can get the UPN and pass to get manager.

Could you please tell me how exactly did you use Search for Users. I could add that action but its not working even though in Get Manager action I can see the UPN field in dynamic content. Also how did you limit it to single user? I am also giving "Created By Email" as an input to the Search for Users action.

Hello Prashant,
I used the "Search User" action passing as parameter "Created By Mail" and the
"Search by User" Action return only one result (the user profile). After that, inside the result container, I get the UPN from user and pass as a parameter to "Get Manager"action. I need pay attention to all actions after "Search User" action need stay inside the result container.
In the image bellow you can see the example:


Thank you for your prompt response. I will try to implement this and will let you know the outcome.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,398)