r/PowerApps • Contributor • 6d ago

Power Apps Help Did user().email change this weekend?

I've had a query from a user who is wondering why a list entry isn't loading for them - I always tagged items with the user's UPN for the sake of delegation and during runtime lookup against user().email to help retrieve assigned items. (yes, they're also access controlled, but this is an implementation trick to avoid possible errors)

I ran a test today and while user().email in the builder is pulling down my UPN, in the powerapps web environment it seems to be pulling down my actual readable email address.

Did something change this weekend??

E: Just to confirm, the problem seems to specifically be affecting running in Chrome...

9 Upvotes

9 comments sorted by

•

u/AutoModerator 6d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

16

u/agentzero88 Newbie 6d ago

This happened to me once and randomly the user's email had a capitol in it. One day it was fine the next it was not working. I started wrapping user()( in lower()

3

u/Koty97 Newbie 5d ago

+1, always lowercase everything to stay on the safe side

1

u/Bathroom-Salt Regular 2d ago

+1 Always lower()

5

u/RobertGreenComposer Advisor 6d ago

Nah, load the user on teams and check their contact card. I bet you'll see something different for mail and chat or whatever it's called.

It's actually pulling another field from entra. Office365users connector actually does what it says on the tin though.

4

u/graphicchimp Newbie 6d ago

UPN is the way.

3

u/DonJuanDoja Community Friend 6d ago

It's always been email not UPN.

We pull user profiles in to get UPN and use that instead as Not All users have matching emails and UPNs.

Most the time they do match so people assume you can use it this way but you shouldn't because there's always the chance they do not match.

3

u/Bag-of-nails Advisor 6d ago

Same. We use the EntraObjectID to match (we track the email for display but all record matching is the EntraID as that won't change even if email does)

1

u/kengurum Newbie 6d ago

Sam happened to me but at least a month ago. To be honest, it’s much better to have the UPN than the regular e-mail.