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 / How to identify a Powe...
Power Apps
Answered

How to identify a Power Apps user and assign certain rights referencing a SharePoint list directory

(0) ShareShare
ReportReport
Posted on by 7
My app, OnStart, checks the user's email, full name and EntraObjectId against a SharePoint list and stores his/her Role (a column in SP) in a variable that is then used to make certain controls in the app visible/usable based on Role.
 
I've used this system for years, but something now is not working. I have users that my app can't find in my SP list, neither using User().FullName, User().Email, nor User().EntraObjectID.
 
Can anyone tell me if there is a better method I can use and if Microsoft has changed something recently with the creation of user identities?
 
Thank you
Categories:
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     
     

    The most common cause right now is Guest vs Member account behaviour. If any of your affected users are guest accounts in the tenant, User().Email may return their external UPN rather than the email stored in your SharePoint list, and User().EntraObjectId may differ from what you expect depending on how the account was provisioned.

    The second thing worth checking is whether your SharePoint list is storing emails in a Person column versus a plain Text column. If it is a Person column, do your lookup against the email property of that column like this:

    LookUp(YourSPList, PersonColumn.Email = User().Email)

    Rather than comparing against a text field directly.

    Third — User().EntraObjectId is the most reliable identifier since it never changes even if someone's email or display name changes. If that is also failing, check whether the Object IDs stored in your SharePoint list were populated correctly and match exactly what Power Apps returns. A quick way to test is to add a temporary label in your app showing User().EntraObjectId and compare it manually against what is in the list for that user.

     

    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 
  • Verified answer
    11manish Profile Picture
    3,333 on at
    Yes — identity behavior in Power Apps and Microsoft Entra ID has evolved, and older approaches based on User().Email or User().FullName are becoming less reliable due to aliases, guest accounts, hybrid identities, and synchronization changes.
     
    The best modern approach is:
    • use User().EntraObjectId as the unique identifier
    • preferably move role management to Entra Security Groups or Dataverse security roles
    • avoid relying solely on email matching for authorization logic
    because email addresses are no longer guaranteed to be stable or unique identity keys across all Microsoft identity scenarios.
  • SI-24052054-0 Profile Picture
    7 on at
    Thank you, @11manish and @Vish WR, for clarifying this new standard. In the end, I was able to resolve with a combined approach: check text email, check UPN, check Person.Email, check EntraObjectID and pick whatever works! And it did work!... Unfortunately, not having admin rights over the system, I can't use Dataverse, Office groups, nor Entra groups (it would require me having to go through an admin every time I have to add or modify a user. Thanks again!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard