Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
In the official documentation for RLS it says:
Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.
This does not seem to be the case. In service both username() and userprincipalname() seem to return a user's email address, rather than their User Principal Name.
There are a couple of other oddities/bugs. The Preview a report as a role/specific person in the Security section of a dataset in Power Bi Service interprets UPN in the desktop manner as compared to what Power Bi Service will actually show a user (email address).
A smaller point is that Power Bi service shows the UPN to be different things in different areas. When reviewing the list of users with access to a workspace hovering over the information icon of a user shows the UPN to be their email address. If you view the UPN of the same user in the RLS Preview section of a report the UPN it is shown as their actual UPN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.