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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.