Forum Discussion

sanjanarama's avatar
sanjanarama
Icon for Resolver I rankResolver I
1 year ago
Solved

RLS, OLS and Field level security in powerbi

I have three tables named    User table : UserID Permision Set ID 1 a 1 b 2 c 3 a 4 c     Object level security table Permision Set ID table names a table1 ...
  • rohit1991's avatar
    1 year ago

    Hi sanjanarama,

    To dynamically implement Row-Level Security (RLS), Object-Level Security (OLS), and Field-Level Security (FLS) in Power BI, start by defining relationships between the User Table, Object-Level Security Table, and actual data tables based on the Permission Set ID. For RLS, create a role in Manage Roles using a DAX filter like [UserID] = USERPRINCIPALNAME(), ensuring users can only see the data assigned to their Permission Set ID. For OLS, use Tabular Editor to restrict access to entire tables by filtering the Object Level Security Table to check if a table name exists in the user's assigned permissions, dynamically controlling visibility. 

     

    To enforce FLS, create a calculated column or dynamic measure that checks if a user has permission to view a specific column, filtering the Field Level Security Table for matching Permission Set IDs and using CONTAINS logic to restrict access dynamically. By applying these techniques, when User 1 logs in, they will only see data related to their permissions, such as the father's name column from Table 4, ensuring secure and dynamic access control in Power BI.