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 changed primary e...
Power Apps
Unanswered

User changed primary email AND name - has broken all apps!

(0) ShareShare
ReportReport
Posted on by 40

Hi,

 

We use the User() function in Powerapps to identify users, and then lookup on the Primary Email to get the User ID.

 

This is great and works well, allowing us to retrieve per-user information in our app.

 

Unfortunately, if a user changes their email in the Users entity, that linkage is broken. Example:

 

Primary email at creation firstname.lastname@company.onmicrosoft.com

Primary Email is changed in Users to firstname.lastname@company.com

However, this change is not reflected in the User() function in Powerapps - which I understand to be associated with the O365 Account.

 

How do I account for this? We absolutely need to tie records to the User ID as it is used in a number of LookUps and changing these is not an option.

 

Thank you

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @jzia93 ,

     

    Could you please share some sample code and error messages about broken linkage?

     

    As you mentioned, the User() function just returns back the current user's office365 information, it has nothing to do with User Entity.

    What we can do is to create a new variable at App.OnStart and modify the domain based on the user().Email.

    Please try this:

    Set(VarUser, Substitute(User().Email, "company.onmicrosoft", "company"))

    Hope this helps.

    Sik

  • jzia93 Profile Picture
    40 on at

    Thank you, I tried a few additional workarounds:

     

    1. Referencing other fields in the User entity (Windows Live ID)
    2. Changing the email @onmicrosoft.com - I need to check if this holds for people amending other parts of their email too

    There's no broken code - just missing data.

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @jzia93 ,

     

    So the above suggestion doesn't make sense?

    If you can share more details about your issue, we can be more helpful to your issue.

    Sik

     

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 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard