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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mp390988
Helper IV
Helper IV

How to go about in implementing RLS

Need guidance in implementing row level security on the below Employees table:

 

EmployeeLocal DepartmentDepartmentManager ID
Johnny DeppData AnalyticsFinanceKris Moll
Brad PittData AnalyticsFinanceKris Moll
Matt DamonProduct ControlFinanceMatt Damon
James GreavesProduct ControlFinanceMatt Damon
Roopa NaragrachaMarket DataFinanceFilip Navros
Madhu SaiMarket DataFinanceFilip Navros
Jay PotLiquidity RiskFinanceChalie Ker
George ClooneyLiquidity RiskFinanceChalie Ker
Clive OwenFP&AFinanceClive Owen
Raju SinghFP&AFinanceClive Owen
Chris HelmsworthFP&AFinanceClive Owen
Kelly SmithData AnalyticsFinanceKris Moll

 

 

This is the data model:

 

mp390988_0-1746381858506.png

 

 

Employees who are not a manager, should only see their data. So for example, Johnny Depp is an employee and is not a manager, so he should only see their records.

 

Employees who are a manager should see their data as well the employees they manage. So for example, Clive Owen is an employee with manager status so he should see his records as well Raju Singh and Chris Helmsworth.

 

How do I do this?

1 ACCEPTED SOLUTION
OktayPamuk80
Helper V
Helper V

Hi,

If you have only two layers it can be handled by following:

1) Join emails of Employee as "Employee Email" and Manager's as "Manager Email". In the Desktop follow this:

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security

2) Here you define 2 roles "Employee" and "Manager"

3) For employee role you set "Employee Email" == userprincipalname() 

4) For manager role you set "Manager Email" == userprincipalname() 

5) Follow RLS configuration in the Power BI Service after publishing

 

View solution in original post

5 REPLIES 5
v-vpabbu
Community Support
Community Support

Hi @mp390988,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @mp390988,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @mp390988,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

techies
Solution Sage
Solution Sage

Hi @mp390988 have you tried using PATH and PATHCONTAINS dax ?

Employees who are a manager should see their data as well the employees they manage.

PATHCONTAINS([Path], LOOKUPVALUE(data[Employee key], data[email], USERPRINCIPALNAME()))

 

 

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978
OktayPamuk80
Helper V
Helper V

Hi,

If you have only two layers it can be handled by following:

1) Join emails of Employee as "Employee Email" and Manager's as "Manager Email". In the Desktop follow this:

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security

2) Here you define 2 roles "Employee" and "Manager"

3) For employee role you set "Employee Email" == userprincipalname() 

4) For manager role you set "Manager Email" == userprincipalname() 

5) Follow RLS configuration in the Power BI Service after publishing

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.