cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to return a user ID using flow?

Hi Everyone, This should be an easy solution but for some reason its taking me a while.

 

I need to return the user ID for an specific SharePoint user. The user's login is in a Person of Group column.

The column doesn't allow multiple selections and nothing strick like that is basically a people picker column.

When I hover over the login name I get a url like the one below:

 

"https://tenantname/sitepage/_layouts/15/userdisp.aspx?ID=47"

 

the user ID is right there at the end of the url, I figured, if I put this value in a "Compose" step I should be able to split the string and return the ID at the end.

 

Well when I put the value in compose I get all these other values except for the one I'm looking for:

 

ComposeReturn.JPGSo my question would be, what is the proper way of getting the User ID using flow? I could use the "Created By" Id too if that is easier. Or is there a way to get the url of the Person or Group value so that I can parse the ID out of it?

 

Thank You

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to return a user ID using flow?

Hi,

 

If you know the user email you can find the user id by using the REST API

 

sp15.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User II
Dual Super User II

Re: How to return a user ID using flow?

Office 365 uses the User Principle Name as the username for the user logging in.  That will match the email address that you see in the return values.  But if its a Person/Group column there is an easier way than using the URL to look the user up in the User Information list.  The user or group column returns the email directly as one of the properties.  That email is the account the user used to login.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper I
Helper I

Re: How to return a user ID using flow?

Thank You for your Prompt answer @Pstork1 !

 

You are right using the User information List, is easier to return the information from the user. But it still doesn't seem to get me the "User ID", is there an specific way o return the user Id as a value by using the User Information List?

 

Again thank you so much for your help.

Highlighted
Super User III
Super User III

Re: How to return a user ID using flow?

Hi,

 

If you know the user email you can find the user id by using the REST API

 

sp15.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Dual Super User II
Dual Super User II

Re: How to return a user ID using flow?

The point is for Flow and Office 365 the email is the UserID?  Or are you trying to get the AD Accountname as though they were logging in to an on-premises server?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper I
Helper I

Re: How to return a user ID using flow?

Thank You very much, this is what I needed

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (9,949)