Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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().
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 71 | |
| 67 | |
| 64 |