Forum Discussion

sricharan_g's avatar
sricharan_g
Frequent Visitor
6 years ago

RLS not working on PowerBI service

Hi All,

 

I have created roles on Power BI desktop and tested, it works fine. But after publishing my report and Tested for a role, the data on visuals is blank. The weird thing is, it doesn't work only for a couple of Email IDs and it works on the desktop(when I tried with 'View as roles') for these IDs. Going crazy over this for the last couple of days. I've tried below steps as well but nothing seems to work.

  • Deleted the dataset and republished
  • Created a new workspace and published into it
  • Dropped the roles and recreated as well

Any help would be greatly appreciated.

4 Replies

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

    Hi , sricharan_g 

    I'm not sure whether you use dynamic rls or static rls.

    Maybe you can try to follow these steps to check.

    (static rls)

    1.make sure your dax is written correctly.
    2.make sure that correctly add members to the role.

    (You can add a member to the role by typing in the email address, or name, of the user, security group or distribution list you want to add. You cannot add Groups created within Power BI. )

     

     

     

    (dynamic rls )

    1.Make sure the account in the table matches your  service account

    2.make sure your dax is written correctly.

     

    For more details , you can refer to this artice:

    https://docs.microsoft.com/en-us/power-bi/service-admin-rls

     

    Best Regards,
    Community Support Team _ Eason

    • sricharan_g's avatar
      sricharan_g
      Frequent Visitor

      Thank you for your response. 

      I've implemented a dynamic rls and it seems to be working on desktop with the same account ID as used in service. I don't understand the issue.

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

        Hi , sricharan_g 

        "The data on visuals is blank" means that rls is still effective.

        So it is most likely that account in the table doesn't  match your  service account.

        Did you use  function " username ()" instead of  "userprincipalname() " in the roles defined in the desktop.

         

        Maybe you can refer to this article:

        https://community.powerbi.com/t5/Desktop/USERNAME-function-DAX/m-p/224227

         

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Use a filter in the role like: UserPrincipalName()=Concatenate(UserID,"@microsoft.com") 

    Hope that helps!

    Regards,

    Lewis