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:
So 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
Solved! Go to Solution.
Hi,
If you know the user email you can find the user id by using the REST API
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogOffice 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.
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.
Hi,
If you know the user email you can find the user id by using the REST API
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThe 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?
Thank You very much, this is what I needed
User | Count |
---|---|
87 | |
38 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
50 | |
47 | |
35 | |
25 |