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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / User().email and Share...
Power Apps
Unanswered

User().email and SharePoint person.mail return different values

(3) ShareShare
ReportReport
Posted on by Microsoft Employee

I have created an app that queries for data from SP list. In the list I have "Person or group" field which is filled with some user accounts.

 

Some users have different e-mail from alias - for example their e-mail is john.doe@contoso.com and their alias is jdoe@contoso.com.

 

Now when I do the User().mail what I get is user alias.

When I query SP list for person.email I get e-mail of the person.

 

It would be good if PowerApps would make distinction between an alias (UPN) and e-mail as this is raising some issues. It would be great if User() function would also return "Claims" like SP list query does, so we could do easy comparison of the values and query SP data based on the current user.

Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @PWrobel,

     

    About feature requests or and ideas about PowerApps, please consider to post in below forum where others can vote.

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Regards,

    Mona Li

  • TeeroyLyon Profile Picture
    73 on at

    Hey @PWrobel !

     

    I'm trying the same thing.  Two different email addresses.  Do you know of a way to find a match the accounts?

     

    Thanks!

    Troy

  • TheRobRush Profile Picture
    11,128 Moderator on at

    You guys might check this, these two codes below in my organization at least, will provide both versions of a users email. 

     

    Office365Users.MyProfile().Mail
    Office365Users.MyProfile().UserPrincipalName

     

  • kkalra1 Profile Picture
    Microsoft Employee on at

    @PWrobel 
    If you want to compare User Principal Name(UPN) then you can use the below approach:

     

    Office365Users.MyProfileV2().userPrincipalName = Office365Users.UserProfileV2(SharePoint_PersonField.Email).userPrincipalName

     



    If you want to compare SMTP mail address then you can use the below approach:

     

    Office365Users.MyProfileV2().mail = SharePoint_PersonField.Email

    _____________________________________________________________________________________
    Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
    This helps others find solutions to future issues!

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard