Forum Discussion

garimajain85's avatar
garimajain85
Frequent Visitor
2 years ago
Solved

Dynamic Row Level Security

Has anyone utilized Row-Level Security (RLS) in their Power BI reports. Specifically, has anyone configured it such that individuals can access and view their own data, while preventing them from seeing others' data?
Userprincipalname() blanks out the data for me both in desktop as well as in service, but if I manually type the email address as a filter, then it works fine!
  • Hi garimajain85 ,

     

    Be aware that RLS only works for users with viewer permissions in the workspace, all other roles (admin, member or contributor) since can edit the reports don't have RLS applied because it won't make sense in terms of role.

     

    That is why you can't see the role working for you specifically.

7 Replies

  • Hi garimajain85 ,

     

    Be aware that RLS only works for users with viewer permissions in the workspace, all other roles (admin, member or contributor) since can edit the reports don't have RLS applied because it won't make sense in terms of role.

     

    That is why you can't see the role working for you specifically.

    • garimajain85's avatar
      garimajain85
      Frequent Visitor

      Thanks Felix,

      It seems to be working now partially. Some visuals are still blank:(

  • I am facing the same issue, added the filter as below in 'Manager roles' in desktop

     

    [emailid] == userprincipalname()

     

    then saved it and wanted to test the role with 'view as'

     

    but when i select the specified role, all data goes blank

     

    • MFelix's avatar
      MFelix
      Super User

      Hi anoomohan

       

      To test the role you need to select view as and fill the other option with the email you want to test

      • anoomohan's avatar
        anoomohan
        Helper III

        yes, i did that only, its mind boggling to see that its not working despite doing the same steps whats necessary for the DRLS. 

    • garimajain85's avatar
      garimajain85
      Frequent Visitor

      It worked for me after I made sure I had the correct relationships and "keys" in the model.

  • For testing, i have created user table(Store ID and Email adress) with some random email address. For default, I have given same email address in all rows for all store ID's  I have created a new role 'Access Control' where email id = userprincipalname().But when I try to view as 'Access Control'. Everything gets blanked out in table just showing the totals. When i view as other user (example : my email ID), it displays everything. It looks strange. Is there any fix for it ?