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

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,496)