cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmDev
Super User
Super User

User().Email function throws a 'live.com#' prefix to my '@hotmail.com' email address

Hi

 

I'm currently testing an app using my org email address and my personal hotmail address to mimic an external user.

 

I'm using some role based security/logic for certain cards in a form and was struggling with it for a while, but have just realised, my problems are being caused by the 'live.com#' prefix, which is added to my '@hotmail.com' email address. 

 

I suppose I can add some logic to get around this in the testing phase, but I cannot rule out the chance that an external user during prod may use hotmail or some other address, which creates similar but different prefixes that my logic doesn't resolve.

 

Has anyone ran into this problem before and if so do you know of a robust fix?

 

Many thanks

Gerard

4 REPLIES 4
mrpowergage
Resolver I
Resolver I

Same issue here, did you get anywhere with this @AmDev ?

 

The only insight i can offer is that it is the same with my @gmail.com address

Hi @mrpowergage - sorry for the delay.

 

No, I ended up putting some logic in to get around it, which isn't ideal - especially if you had the same issue for gmail also, which gives at least two scenarios where this would be an issue and there will no doubt be more, so logic isn't going to cut it long-term. The solution isn't in prod yet, but plan to pick it up again and try to bottom this issue out. If you manage to get there before me, I would appreciate any pointers. Many thanks

mrpowergage
Resolver I
Resolver I

Thanks @AmDev 

 

I’m optimistic that we can just split on # and that will work for all cases. 

I’m in production on this with a small pool of external users. If I come up with any cases that don’t work I’ll post here. 

mike_honey
Advocate I
Advocate I

I just bumped into this also and can confirm that User().Email returns a weird "live.com#<email>" string for some external users.  The trigger seems to be when they do not have a Microsoft 365 account, if true that's impossible to know reliably in advance.

 

This contradicts the documentation, which states the UPN will be returned. UPNs for users in this scenario are actually presented in the format "<email>#EXT#<host domain>". 
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user


I've pointed this out in doco feedback, so hopefully that will at least become accurate eventually. 

 

The best solution would be for User().Email to return (...drumroll...) the user's email. I cant think of any use case where anyone would want anything different.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,274)