Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
magji
Helper I
Helper I

USERPRINCIPANAME() returning the same for all users.

We are trying to implement RLS to a dashboard which source is SQL Analysis Services.

When using USERPRINCIPALNAME() on desktop I get my UPN, but when I publish the report to Online Services it returns an UPN which is the same for every user viewing it. which looks like Server's username.

 

How can I get the user's UPN also when I publish the report online? In Power BI Report server there was a way to Impersonate the user viewing the report, but I am not able to find it in Online Services.

2 REPLIES 2
ibarrau
Super User
Super User

Hi. I haven't tried this but I pretty sure the USERPRINCIPALNAME() should be on Analysis Services and not in desktop. Now SSAS is the owner of the dataset, so you should keep roles and dax in there. 

You can follow this guide to be sure you are doing all necessary steps:
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-tutorial-row-level-security-onprem-ss...

(Step 2 is creating the RLS in SSAS)

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Yes, the Row level security is set in SSAS. But the Power BI somehow is not recognizing the user's UPN.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors