cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SimonTocker
Level: Powered On

User().Email display UPN value not Email

Hi,

at this point in time Im working with a company that does not use the users Email as the UPN, this is a valid approach, its allowed,  whilst it causes problems with Invites to 365 sites, it is a valid scenario.

When In powerapps,  I I use the function User().Email,  then the users UPN is displayed,   this is not the users Email, but in testing because everyone users an email address in the UPN it is easily missed in testing.

In the picture below I hid the actual text being returned,   but the label below shows the format of the companies UPN,   it would look like   

    X99999@company.com   

The users SAMAccount is the prefix and the companys actual domain is the suffix,   it looks like an email address, but isnt and isnt tied to an exchange alias either.   So it cannot be used as an email,   

The User().Email   function and property needs to get the actual AzureAD email field.

UPN.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: User().Email display UPN value not Email

Hi @SimonTocker,

 

Does your email address and UPN are not the same?

 

The email address and UPN would be same by default, and I have made a test on my side with function User().Email, and the function would works fine to get the email address:

Capture.PNG 

 

I afraid that your mail address and UPN is different, if you want to get the mail address and not the UPN, you could add connection Office365Users,and then take a try with function Office365Users.MyProfile().Mail :

Capture.PNG  

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: User().Email display UPN value not Email

Hi @SimonTocker,

 

Does your email address and UPN are not the same?

 

The email address and UPN would be same by default, and I have made a test on my side with function User().Email, and the function would works fine to get the email address:

Capture.PNG 

 

I afraid that your mail address and UPN is different, if you want to get the mail address and not the UPN, you could add connection Office365Users,and then take a try with function Office365Users.MyProfile().Mail :

Capture.PNG  

 

Best regards,

Alice

View solution in original post

SimonTocker
Level: Powered On

Re: User().Email display UPN value not Email

Hi. Yes they are different.

Thankyou for your advice Alice thats a good workaround, I will use that.

However My point is to inform the powerapps team of this. They should not be mistaking the two.

It is advised they are configured the same. But they do bot have to be.

Teams in Microsoft should be more aware and not just assume this and get the right attributes from the users ad attribs and not make assumptions.

I will admit that having a upn that is not your email is the dumbest move ever. If I could kick the idiot, who forced this on us, up and down the office car park I would, repeatedly, So would several others I know.

But please, if you are able, pass this BUG to the team.

Thanks
Simon
Dawidvh
Level 10

Re: User().Email display UPN value not Email

Hi everyone,

 

If you would like to see more information about this topic or the work around, please see below video.

 

Have a great day!

 

https://youtu.be/6FU1xGxJK5w

 

Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,081)