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
Solved! Go to Solution.
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.
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.
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
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.
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.
User | Count |
---|---|
253 | |
250 | |
82 | |
45 | |
27 |
User | Count |
---|---|
349 | |
264 | |
127 | |
60 | |
58 |