March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Good evening,
I have a small issue concering RLS on a Financial Report I am building.
Background
It an Income/Expenditure report
RLS added via User Role from the Active Directory
Upper managment should see salary values
Lower management should not see salary values
Table of user roles includes a "salary view" column which is either 1 or 0:
I set up two roles in the Manage Roles section:
Non Salary viewing
Salary Viewing
added the lookupvalue for the Organisation Roles:
[organizationalPerson.title] = LOOKUPVALUE(
user[organizationalPerson.title],
user[user.mail],
USERPRINCIPALNAME())
added the [Salary view] filters to the appropriate roles:
added the filer to exclude Salary costs from the main data in only the non-viewing role:
After saving, publishing to my test site and adding the organisations all user group to both roles,
Testing as role works.
The salary is gone for the Non viewing version and appear for the Viewing version.
I then removed the role flags and added a user I know should not be able to view the salaries.
The salary values are still there.
RLS didn't channel the user toward the Non-viewing role and restrict the values as expected.
my data is complex, really simplified version below:
id | user.email | organisation.role |
1 | data | Upper Manager |
2 | data | Lower Manager A |
3 | data | Lower Manager B |
4 | data | Upper Manager |
organisation.role |
Upper Manager |
Lower Manager A |
Lower Manager B |
organisation.role | DirectorateLink | SalaryView |
Upper Manager | A1 | 1 |
Upper Manager | A2 | 1 |
Upper Manager | B1 | 1 |
Upper Manager | B2 | 1 |
Lower Manager A | A1 | 0 |
Lower Manager A | A2 | 0 |
Lower Manager B | B1 | 0 |
Lower Manager B | B2 | 0 |
DirectorateLink | Directorate | CostCenter | Mgmt Acc Cat | Value |
A1 | A | 1 | Salary Costs | 1 |
A1 | A | 1 | Other Costs | 1 |
A2 | A | 2 | Salary Costs | 1 |
A2 | A | 2 | Other Costs | 1 |
B1 | B | 1 | Salary Costs | 1 |
B1 | B | 1 | Other Costs | 1 |
B2 | B | 2 | Salary Costs | 1 |
B2 | B | 2 | Other Costs | 1 |
Can anyone help me restrict the user's data view based on a 1/0 setting whilst using RLS?
Any help will be great!
Solved! Go to Solution.
No, you don't want them as members of the workspace so it sounds like you are sharing it correctly. It was just something that I know has caused problems for me in the past.z
When I said RLS is not applied to them if they are members of the workspace I meant that PowerBI sees them as having full rights for the dataset so RLS is skipped.
Is the user that should be restricted but isn't a member of the workspace? If a user is a member of the workspace RLS is not applied to them because they have access to the dataset.
https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls
Ok, I get what you mean. However, and I should have mentioned, everyone will be using the app and not the workspace (aside from me and our finance team).
Or, does everyone have to be a member of the workspace too in order for RLS to kick in and restrict the app?
No, you don't want them as members of the workspace so it sounds like you are sharing it correctly. It was just something that I know has caused problems for me in the past.z
When I said RLS is not applied to them if they are members of the workspace I meant that PowerBI sees them as having full rights for the dataset so RLS is skipped.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |