cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Is it possible to get UPN of current user?

I'm building solution with PowerApps and Power BI. I try to build unified user access authorization defined in Azure SQL.

 

1) Power BI is using username() to get user by UPN format.

2) PoweApps is getting User().Email to get user by email format. 

 

Is it possible to have both solution using either email or UPN format for fetching current user?

 

Ken

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kenny_i ,

 

Please see below video to show the options for Email().Email returning the UPN.

 

Let us know if you don't come right.

 

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.

View solution in original post

3 REPLIES 3
Highlighted
Super User II
Super User II

In PowerApps the User().Email actually returns the UPN and not the email address. In my company our UPN and email address are different, so I have had to work around this issue by getting the email address through the Office365Users connector. If you are worried about the User().Email being fixed to actually show the email address then you can use the Office365Users connector to get the email address or UPN for the current user.

 

Examples:

Office365Users.MyProfileV2().mail

Office365Users.MyProfileV2().userPrincipalName

 

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted

PowerApps User().Email do return email address to me. Also specs says that it should return email. address. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user

 

PowerBI returns login.

https://msdn.microsoft.com/en-us/query-bi/dax/username-function-dax

 

I'm happy either way but trying to find way to authorize with PowerBI or PowerApss with same user identification.

Hi @kenny_i ,

 

Please see below video to show the options for Email().Email returning the UPN.

 

Let us know if you don't come right.

 

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,087)