Forum Discussion

jdobrzen's avatar
jdobrzen
Advocate III
8 years ago
Solved

RLS cumulative security

Are Power BI security roles cumulative in the same way that Analysis Services Tabular is?   In the Permissions section of the arctile below it states:   "When a user is a member of multiple roles...
  • jdobrzen's avatar
    jdobrzen
    8 years ago

    So I did some research to see if Analysis Services (AS) would respond the same way, and the short answer is it does.

     

    I created a model with two different RLS "enabled" security roles, and assigned the same user to both.  I also tried this with the two roles assigned to different RLS tables securing two different dimensional tables. The results were the same.

     

     

     

    When I access the model through Excel with this user, I receive the following error.  While not as descriptive as the error message in Power BI, I assume it is because of the same reason.

     

     

    I experimented a bit further and found that the user can belong two seperate security roles, but not more than one of those roles can be RLS "enabled".  When I remove the RLS logic from just one of the two roles, I am then able to see all of the top 10 customer IDs that are defined in the RLS database table.  So it sticks to the fact that role based security is cumulative. One role has read access to the entire model, while the other only has access to the top 5 customers. This will result in being able to see all customers contained in the underlying RLS database table.

     

    When running the same experiment against Power BI, it responded the same way.  When I have two roles that are both RLS "enabled" I get the original error message.  When I remove the RLS logic from one of the security roles, the security becomes cumulative and the user is then able to see all entries in the underlying RLS table.

     

    So I guess the solution is to design around this behavior and avoid applying multiple RLS "enabled" security roles to a single model.  When I refactor the design to include just one security role with the following logic instead, I still get the desired result of having either or logic applied and allowing only project managers to see their projects, practice leads to see their practice's projects, and project manager/practice leads to see both.

     

     

    Please let me know if you see a hole in this logic, if I missed something, or you have anything else to add.