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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard