Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Row Level Security LWS

Hi All, We have implemented Dynamic Row Level Security in our report and published in app services but whenever the user is accessing the report ,he is able to see the entire data and not the restri...
  • Greg_Deckler's avatar
    4 years ago

    Anonymous You have to add the user into an RLS role at the dataset. With Dynamic RLS that is generally a role that implements a filter on a security table like [Email] = USERPRINCIPALNAME()

  • Greg_Deckler's avatar
    Greg_Deckler
    4 years ago

    Anonymous 

    (1) Dynamic Hierarchical Row Level Security - Microsoft Power BI Community

    So, you generally have a table like the following:

    Email

    [email protected]

    [email protected]

     

    etc.

    You create a Role (RLS role) and the role has an expression like:

    [Email] = USERPRINCIPALNAME

     

    Meaning that users in this Role can only see their own row. This row is then linked (related) to the rest of your data in your other tables meaning that only related rows to this single row are visible to the person in the RLS role.

     

    You publish the dataset. Then, in the Security for the dataset in the Service you add users to this Role. Now, when they view reports based on the dataset, they only see their own information. Now, the caveat is that you do NOT want to add those users to the workspace because that overrides RLS.

  • Burningsuit's avatar
    4 years ago

    hi Anonymous 

    This is probabaly because of the access permission your users have in the Workspace. If they have Workspace access, either as Admin, Member or Contributor, they are not subject to RLS and will see ALL the data. Only Viewers are subject to RLS in the Workspace. This feeds through to Apps too. If they are Admin, Member or Contributor on the Workspace the App is built from they will see ALL the data in the App. Only Viewers, or users not given Workspace access are subject to RLS in the associated App.

    Remove the users access to the Workspace and they will be subject to RLS in the App.

    Hope this helps

    Stuart