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 am setting up Dynamic RLS and planning to use the USERPRINCIPALNAME function. However, staff have emails used in outlook which are different than the emails used to share out reports. I want to confirm that I am choosing the correct email to set up the RLS with.
To sign into a Microsoft account and to share the report the email format is user@locationlocal.ca. And the outlook emails are simply user@location.ca . I assume I need to use the user@locationlocal.ca emails for security.
My employee table has a column for each email format. I created the CSW_RLS role, and when testing 'View as' with either email type the data filters correctly if I specify what column to use as principal username. E.g., to filter using the locationlocal.ca email I have [Microsoft Email] = USERPRINCIPALNAME(). To filter using the location.ca email I have [Outlook Email] = USERPRINCIPALNAME().
How can I be sure which email format to set for the RLS?
Solved! Go to Solution.
Hi @skygold16 ,thanks for the quick reply, you are right.
Hi @Anonymous ,
As skygold16 said , the USERPRINCIPALNAME() function in Service returns the e-mail address you use to log in to Power BI Service.
Thank you both! That is what I assumed.
Hi @skygold16 ,thanks for the quick reply, you are right.
Hi @Anonymous ,
As skygold16 said , the USERPRINCIPALNAME() function in Service returns the e-mail address you use to log in to Power BI Service.
Hi,
I think you need to always use the email address which end user will be using to login to Power BI service.
Thanks,
Harsh
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |