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.
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.
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.
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.
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:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!