cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Roberts2727
Level: Powered On

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?

 

pto.PNG

12 REPLIES 12
Community Support Team
Community Support Team

Re: Office 365 User Get-Manager not working

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.

Capture.PNG

 

Regards,

Mona

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.
Roberts2727
Level: Powered On

Re: Office 365 User Get-Manager not working

@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.

Roberts2727
Level: Powered On

Re: Office 365 User Get-Manager not working

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.

Community Support Team
Community Support Team

Re: Office 365 User Get-Manager not working

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.

 

Regards,

Mona

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.
Roberts2727
Level: Powered On

Re: Office 365 User Get-Manager not working

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.

PushpaP
Level: Powered On

Re: Office 365 User Get-Manager not working

Was this ever resolved? I am facing the same issue
Roberts2727
Level: Powered On

Re: Office 365 User Get-Manager not working

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

Anonymous
Not applicable

Re: Office 365 User Get-Manager not working

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.

Highlighted
brunoweinschutz
Level: Powered On

Re: Office 365 User Get-Manager not working

Hello,

 

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.

prashant1380
Level: Powered On

Re: Office 365 User Get-Manager not working

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.

brunoweinschutz
Level: Powered On

Re: Office 365 User Get-Manager not working

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:

Print

prashant1380
Level: Powered On

Re: Office 365 User Get-Manager not working

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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (6,296)