How to get User ID by Email in MS Flow (Power Automate) SharePoint
Its pretty straight forward when you know how to do. Going straight to the point.
- Create a new MS Flow and name it whatever you want.
- Create Get Items action. and fill the Site Adress, list name etc according to your environment.
- I am renaming my action to GetUserIDByEmail.
- Initialize a Variable and set its value to expression as mentioned below.
- Save and run the Flow.
Here is the schema of the returned JSON.
{"d":{"__metadata":{ },"Alerts":{ },"Groups":{ },"Id":280,"IsHiddenInUI":false,"LoginName":"i:0#.f|membership|someone@example.com","Title":"Someone Name","PrincipalType":1,"Email":"someone@exmaple.com","Expiration":"","IsEmailAuthenticationGuestUser":false,"IsShareByEmailGuestUser":false,"IsSiteAdmin":false,"UserId":{ },"UserPrincipalName":"someone@example.com"}}
You need to first check the output schema and only then your expression will work.
Comments
Post a Comment