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?
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
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.
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>".
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.
Join us for the next call on August 17, 2022 at 8am PDT.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.