Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

User().Email function throws a '' prefix to my '' email address



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 '' prefix, which is added to my '' 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


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

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. 

Advocate I
Advocate I

I just bumped into this also and can confirm that User().Email returns a weird "<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>".

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

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,283)