Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
AJTindall73
Advocate I
Advocate I

RLS on Financial data

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:

  • 1 = can view salaries
  • 0 = cannot see salary values

 

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:

  • [SalaryView] = 0 to the non-viewing role
  • [SalaryView] = 1 to the viewing role

added the filer to exclude Salary costs from the main data in only the non-viewing role:

  • [Management Accounts Category] <> "Salary Costs"

 

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:

iduser.emailorganisation.role
1dataUpper Manager
2dataLower Manager A
3dataLower Manager B
4dataUpper Manager

 

organisation.role
Upper Manager
Lower Manager A
Lower Manager B

 

organisation.roleDirectorateLinkSalaryView
Upper ManagerA11
Upper ManagerA21
Upper ManagerB11
Upper ManagerB21
Lower Manager AA10
Lower Manager AA20
Lower Manager BB10
Lower Manager BB20

 

DirectorateLinkDirectorateCostCenterMgmt Acc CatValue
A1A1Salary Costs1
A1A1Other Costs1
A2A2Salary Costs1
A2A2Other Costs1
B1B1Salary Costs1
B1B1Other Costs1
B2B2Salary Costs1
B2B2Other Costs1

 

Can anyone help me restrict the user's data view based on a 1/0 setting whilst using RLS?

 

Any help will be great!

 

 

1 ACCEPTED 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.

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

@AJTindall73 

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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.