cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
My_connect
Advocate II
Advocate II

Power automate Get User profile from Display name

Hi 

I'm testing a scenario to get user profile or email address from display name.

ive tried both Get user profile (V2) & Search for users (V2) with no luck. Is this even possible ?

 

Get user profile using display name ( if duplicates, first result)

 

My_connect_0-1628663214096.png

 

Thank you

 

1 REPLY 1

@My_connect 

 

Just typing it in to Search for users (V2) 

works for me.

 

Check for:

1) Ensure no leading or trailing whitespace. There might be hidden whitespace at the beginning or especially, at the end of the input - if there is, take that out and try again. If the display name has whitespace in between the name that is supposed to be there, e.g. 'John Doe', make sure there isn't an extra one there, (i.e. not 'John  Doe')  and that it otherwise matches exactly.

 

2) Make sure the letters are capitalized exactly and matching, this is case sensitive by the way.

 

As for how to get just the first one, you can use some expression like this in a subsequent step:

 

outputs('Search_for_users_(V2)')?['body/value']?[0]

 

81121-fst.png

 

 

Check if it helps.

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,567)