web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can I use "Get User Pr...
Power Automate
Unanswered

Can I use "Get User Profile (V2)" using Nickname?

(0) ShareShare
ReportReport
Posted on by 21

Hi There - 

Thanks to you all for your answers in here; I've been able to teach myself a great deal from just reading the answers.  But I've gotten myself stumped with this one.

 

I have a Form I'm moving responses for to a Sharepoint (no issues with that part).  But as part of creating the full record, I'm attempting to look up the user the response is recorded for using a field on the form that is ultimately an employee ID.  That employee ID is located in the "Nickname" field within Azure.  Is there a way I can use the "Get User Profile (v2)" function to look up based on that employee ID within the Nickname field to return the user profile vs. searching by email only?  It works flawlessly returning it on the email address that's stored as part of the form entry, but in this case, I may have situations where the user making the entry may not be the user who the entry is for (such as a supervisor or support personnel).

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @codywalker,

     

    The Get User Profile (V2) action only allows you to retrieve a profile based on either the User principal name or id. There is also a Search for Users (V2) action. That allows you to search within the display name, given name, surname, mail, mail nickname and user principal name.

     

    Are you using an extensionattribute in Azure Active Directory or do you actually mean the mailNickName attribute?

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/user-profile-attributes

     

    In case of the second scenario you could use a Search for Users (v2) action instead.

     

    mailnickname_searchforusers.png

     

    Alternatively, you could also use a Graph API list users method with a $filter query parameter in a Send an HTTP request action (Office 365 Groups connector)

     

    https://graph.microsoft.com/v1.0/users/?$filter=mailNickname eq '@{variables('employeeID')}'&$select=id,mail

     

    workaround_getuserprofile.png

     

     

     

  • codywalker Profile Picture
    21 on at

    Thank you so much!  This solved not only my current conundrum, but a separate one I've been stumped on for a while and never revisited.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard