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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
IzBell
Frequent Visitor

Role Level Security (RLS) based on Country and/or other criteria

Good day everyone,

I would like to create a DAX measure under Manage Security Roles with the following logic:

  • A small group of users can see all data in the table. 
  • The rest can only see data for the country they are based in, and with some additional exclusion criteria.


For example, I have a table called "Employee_List":

  • Anyone in Team = "aa" AND Department = "A", they can see everything.
  • The rest can see data for the country they are based in, except for data in Department = "A"
Employee IDEmployee NameEmailTeamDepartmentCountry
1007AliceAlice@xx.comaaAUK
1000JohnJohn@xx.comabAFrance
1001AbbyAbby@xx.comacBFrance
1002BenBen@xx.comaeCUK
1003SarahSarah@xx.comabCUK
1004JessJess@xx.comacDUSA
1005BillBill@xx.comaaAUSA
1001MarkMark@xx.comabBFrance
1005BobBob@xx.comacAUSA
1006JamesJames@xx.comadAFrance


For example:

  • Alice is in Team = aa and Department = A, and she can see everything. When she logs in, she can see data for all employees. It will be the same for Bill.
    Employee IDEmployee NameEmailTeamDepartmentCountry
    1007AliceAlice@xx.comaaAUK
    1000JohnJohn@xx.comabAFrance
    1001AbbyAbby@xx.comacBFrance
    1002BenBen@xx.comaeCUK
    1003SarahSarah@xx.comabCUK
    1004JessJess@xx.comacDUSA
    1005BillBill@xx.comaaAUSA
    1001MarkMark@xx.comabBFrance
    1005BobBob@xx.comacAUSA
    1006JamesJames@xx.comadAFrance
  • James is based in France. When he logs in can only see employees in France - excluding Department A.
    Employee IDEmployee NameEmailTeamDepartmentCountry
    1001AbbyAbby@xx.comacBFrance
    1001MarkMark@xx.comabBFrance

 

  • Bob is based in USA. When he logs in can only see employees in USA- excluding Department A.
    Employee IDEmployee NameEmailTeamDepartmentCountry
    1004JessJess@xx.comacDUSA

 

Your help would be much appreciated.
Many thanks,
IzBell

1 REPLY 1
Brunner_BI
Super User
Super User

This is quite complex that is why you do not get an answer quickly here.

 

Here are the conditions:

  • Anyone in Team = "aa" AND Department = "A", they can see everything.
  • The rest can see data for the country they are based in, except for data in Department = "A"

The first one is easy but this is not something you can solve with RLS. You need to create a security group in the active directory for these people. Alternatively, add them as contributors to the workspace so RLS does not even apply OR add them manually (i dont recommend this) to the "none" group or create a group in RLS without any filter. RLS is more about restricting data than giving full access.

 

For your second condition I would also set up two AD groups, one for all other users and one for department A specifically.

Then you set up RLS based on the country and just assign the "other than department A" people to that role.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.