Forum Discussion

HamidBee's avatar
HamidBee
Icon for Power Participant rankPower Participant
1 year ago
Solved

Best way to manage Row-Level Security (RLS) across service areas without maintaining manual email ma

I’m building a Row-Level Security (RLS) model in Power BI where different managers should only see data for their service area. At the moment I’ve created a manual mapping table of Email → Service Ar...
  • anilelmastasi's avatar
    1 year ago

    Hello HamidBee ,

     

    Dynamic RLS using a mapping table is the common best practice. Can you source it from HR system? (like AD, SAP) or can you get data from IT or HR?

  • AmiraBedh's avatar
    1 year ago

    Hello !

    Thank you for posting on MS Fabric community.

    You assign users in your org to Azure AD security groups and in PBI, you don’t reference the group directly in DAX. but instead you can manage permissions at the workspace or app level or pull group memberships into a mapping table if you need row level filtering.

    If you want to follow the best practices, you can use an HR data feed especially if your HR system already has a table of User belonging to department or service Area and often HR or IAM systems keep this up to date so you bring that table into PBI and use it as your RLS mapping table and then your role definition is simply:

    [ServiceAreaCode] IN 
       FILTER('UserServiceAreaMapping', 
         'UserServiceAreaMapping'[UserEmail] = USERPRINCIPALNAME())