Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Guys,
I need help with RLS.
I have multiple tables in my project and I have one user table and i want if a user logs in then he should only see the data based on his role. can someone help me with this?
Should i use the filter like username = username ()
What expression can I write for ID.
Regards,
Himanshu
Solved! Go to Solution.
Hi, @Anonymous
Userprincipalname() refers to the email adress that the user is currently using. This means that the ID column must contain the user email for this to work. Furthermore, the users table needs to be connected by relationship to the tables that needs to be filtered.
[ID] = userprincipalname()
You can try out the RLS roles in Power BI Service to simulate how the report looks when viewing as different users.
You can find this functionality under "Security" in the dataset options of the published dataset.
Br,
J
Hi, @Anonymous
Userprincipalname() refers to the email adress that the user is currently using. This means that the ID column must contain the user email for this to work. Furthermore, the users table needs to be connected by relationship to the tables that needs to be filtered.
[ID] = userprincipalname()
You can try out the RLS roles in Power BI Service to simulate how the report looks when viewing as different users.
You can find this functionality under "Security" in the dataset options of the published dataset.
Br,
J
@Anonymous , Not very clear.
Refer if this can help
RLS - Row Level security
https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns-in-Power/td-p/712613
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |