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
HamidBee
Power Participant
Power Participant

Why does USERPRINCIPALNAME() show “not a function” in the RLS editor?

 

I’m setting up Row-Level Security (RLS) in Power BI Desktop and trying to filter a mapping table by the logged-in user’s email. In the RLS DAX editor I wrote:

 
[Email] = USERPRINCIPALNAME()

But I keep getting the error:

Cannot find name 'USERPRINCIPALNAME'. 'USERPRINCIPALNAME' is not a function.

I thought USERPRINCIPALNAME() is the standard way to capture the signed-in user’s email in the Power BI Service.

Has anyone seen this before? Is this an issue with the version of Power BI Desktop I’m using (maybe Report Server vs. the regular Desktop)? Or is there a setting I’m missing that would enable this function?

HamidBee_0-1759333306804.png

What’s the correct way to make RLS work with user emails in my case?

1 ACCEPTED SOLUTION
AmiraBedh
Super User
Super User

Hello !

Thank you for posting on MS Fabric community.

You’re on PBI Desktop for report server and older PBIRS builds don’t include USERPRINCIPALNAME() so you can use the standard PBI Desktop to update the model or try to upgrade to a recent PBIRS build.

Meanwhile in PBIRS, you can use USERNAME().


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

4 REPLIES 4
v-hjannapu
Community Support
Community Support

Hi @HamidBee,
I would also take a moment to thank  @AmiraBedh 
, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Regards,
Community Support Team.

Hi @HamidBee,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


Regards,
Community Support Team.

Hi @HamidBee,
I wanted to follow up and see if you have had a chance to review the information that was shared. If you have any additional questions or need further clarification, please don’t hesitate to reach out. I am here to assist with any concerns you might have.

Regards,
Community Support Team.

AmiraBedh
Super User
Super User

Hello !

Thank you for posting on MS Fabric community.

You’re on PBI Desktop for report server and older PBIRS builds don’t include USERPRINCIPALNAME() so you can use the standard PBI Desktop to update the model or try to upgrade to a recent PBIRS build.

Meanwhile in PBIRS, you can use USERNAME().


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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