Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
What’s the correct way to make RLS work with user emails in my case?
Solved! Go to Solution.
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().
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.
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().
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.