Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

RLS security doesn´t work shared report by dataset permission

Good afernoon.

 

I'm sharing a report with another user.
He doesn't have access to the workspace, because that workspace has more reports that he shouldn't see, so I give him read-only permission through the dataset.
(It is a production workspace where there are several reports with different accesses managed individually in each dataset)

 

 

 

That dataset has RLS security applied dynamically via the USERPRINCIPALNAME() function.

 

When the user accesses the report (using the "Shared with me" option) he can see all the data, so RLS security is not being applied.
If I try to change the permissions, and instead of giving them through the dataset, I give them to the workspace as the "Viewer" role, then the RLS security is applied.


What could be the problem?
If this is normal, Power BI would have a very important security problem as a tool.

  • Hi, Anonymous

    And if you grant a user read permission  is through the following steps.

    According to the offical document.

    Row-level security may affect the ability of users with read or build permission on a dataset to read data from the dataset.

    • When RLS isn't defined on the dataset, users with write, read, or build permission on the dataset can read data from the dataset.
    • When RLS is defined on the dataset:
      • Users with only read or build permission on the dataset will not be able to read data from the dataset unless they belong to one of its RLS roles.
      • Users with write permission on the dataset will be able to read data from the dataset regardless of whether or not they belong to any of its RLS roles.

        So if RLS should work if only the data set is read; Or try deleting the dataset, republishing it to a new workspace, and testing it out.

    https://community.powerbi.com/t5/Service/Row-level-security-does-not-apply-to-viewer-role-with-dataset/m-p/948634


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous

    And if you grant a user read permission  is through the following steps.

    According to the offical document.

    Row-level security may affect the ability of users with read or build permission on a dataset to read data from the dataset.

    • When RLS isn't defined on the dataset, users with write, read, or build permission on the dataset can read data from the dataset.
    • When RLS is defined on the dataset:
      • Users with only read or build permission on the dataset will not be able to read data from the dataset unless they belong to one of its RLS roles.
      • Users with write permission on the dataset will be able to read data from the dataset regardless of whether or not they belong to any of its RLS roles.

        So if RLS should work if only the data set is read; Or try deleting the dataset, republishing it to a new workspace, and testing it out.

    https://community.powerbi.com/t5/Service/Row-level-security-does-not-apply-to-viewer-role-with-dataset/m-p/948634


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • edhans's avatar
    edhans
    Icon for Community Champion rankCommunity Champion

    RLS only works when the end users has the Viewer role. If they are a Contributor, Member, or Admin, they have full access to the dataset, so RLS is ineffective.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Edhans! 

     

    As I said in the post, user hasn´t Contributor, Member or Admin role.

    The permission is directly given from dataset, not from workspace.

     

    Thank you for your answer.