Hi there,
I am trying to get the user profile after appending the email to the variable (see screenshot below):
I'm having the error that the user profile cannot be found even though the correct email is being input into this. Please help I'm not sure why is it being like this.
Thank you!
The reason for the error is your append to string variable.
The variable contains multiple email addresses, and get user profile does not allow multiple email addresses to be entered at once.
You can use the split function to split the string variable into an array separated by semicolons, and then add an apply to each to iterate over the array.
Enter the expression item() in get uesr profile.
I have made a test for your reference:
Best Regards,
Levi
@debuggingallday Can you try to split and pass individual email addresses?
Hi @CFernandes
The output of the variable is an email address (eg anonymous@outlook.com) . I have 2 different variables with 2 different emails. If i were to put the variable on the search term of "Search for users (V2)", under "Get User Profile" the output would be the value? Not sure what the expression will be. (See screenshot):
Thank you for your help
@debuggingallday - Can you add a Compose action and check the output of your variable?
Search for users (V2) will get me all the users who have for example jagdish in their profile (applies to only display name, given name, surname, mail, nickname and user principal name).
For more details see - https://jd-bots.com/2022/01/15/search-for-users-v2-example-in-power-automate-microsoft-flow/
f 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!
P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
Hi @CFernandes thank you for the reply. What do I put under search string (Search for users) and Get user Profile? Do i have to input the expression and what is the variable that is needed?
Hey @debuggingallday mate,
Try to first search for the user and then use the "Get user profile action.
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!
P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
WarrenBelz
146,786
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional