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?
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.
@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.
Sorry for the inconvenience. You could post this to the idea forum so that the pg will consider this in the future release.
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.
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.
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:
Join us for the first ever Power Platform Online Conference!
Look out for new contribution recognition badges coming SOON!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!