Forum Discussion

pfio's avatar
pfio
New Member
5 years ago
Solved

Testing Dynamic RLS?

Hi, 

 

I have setup dynamic RLS in PowerBI Desktop, and it works great, everything is working as expected. When I go to test entering an email using the "Now viewing as" feature online, I get errors. I can't seem to understand why the difference between the two. My understanding is that since it's dynamic, I do not have to add any users to the group online. But when I enter the email address to test, it still doesn't work. Is this expected for some reason? I am going to test with an actual user tomorrow to see if it works, but wondering if there's any other steps I need to do make the desktop version work online. 

 

Thanks for any help! 

  • pfio's avatar
    pfio
    5 years ago

    Thanks! I figured out what the issue was....you need to set each user to have build permissions online. Worked great once I clicked that button. Glad it wasn't anything more complicated. 

5 Replies

Replies have been turned off for this discussion
  • pfio's avatar
    pfio
    New Member

    Thanks Denis! 

     

    The error is "Couldn't Load Data for this Visual" 

     

    I used USERPRINCIPALNAME() for the RLS. 

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi pfio 

    Within Power BI Desktop, username() will return a user in the format of DOMAIN\User and userprincipalname() will return a user in the format of [email protected].
    
    Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.

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

     

    Based on your description, you may need to assign role to users to apply RLS filter, otherwise they will got this can't load data error.
    Besides, current RLS only works on read permission, so admin and dataset owner can see each records even if they not get RLS roles.

     

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

    • pfio's avatar
      pfio
      New Member

      Thanks! I figured out what the issue was....you need to set each user to have build permissions online. Worked great once I clicked that button. Glad it wasn't anything more complicated. 

      • v-xiaotang's avatar
        v-xiaotang
        Community Support

        thanks for your reply pfio 

        Glad to hear that! 

        could you kindly accept your answer helpful as the solution. so the others can find it more quickly.
        really appreciate!

         

        Regards,

        Community Support Team _Tang