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)
Thank you
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]
Check if it helps.
User | Count |
---|---|
25 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
22 |