Forum Discussion
Filter out using USERPRINCIPALNAME()
- 4 years ago
You can create an RLS role with the rule
[email] <> USERPRINCIPALNAME()Once you have created a role, anyone you want to view the report must be assigned to a role. This is the intended functionality and there isn't a way to avoid assigning roles if you want to use RLS.
See the documentation and prior discussion here:
https://community.powerbi.com/t5/Desktop/Row-Level-Security-All-Users/m-p/253154
HI harshagraj,
You can refer to the following link to know how to set a dynamic RLS based on username:
Solved: RLS with UserName() - Microsoft Power BI Community
Notice: please create a measure with USERNAME and USERPRINCIPALNAME functions to confirm which one is suitable for your user table information.
Difference between USERNAME() and USERPRINCIPALNAME() in Power BI Dax - SPGuides
Regards,
Xiaoxin Sheng