Forum Discussion

niklanzo91's avatar
niklanzo91
Regular Visitor
1 year ago
Solved

RLS for SSAS on Prem not Working

Hi All, I'm working with a Power Bi connected in direct Query with a SSAS on prem. The report is published in Power BI Service. They asked me to test some basic RLS rules based on the email of some...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, niklanzo91 

    I created your tables and used them in SSMS, the data in RLStable is a test mailbox:

     

    In Power BI Desktop, tap the Modeling tab, and then select Manage roles. Create a new role, such as BranchRole. Add the following DAX formula to your BranchTable:

    [CompanyID] = LOOKUPVALUE(RLSTable[CompanyID], RLSTable[UserEmail], USERPRINCIPALNAME())

     

    Publish to the Power BI service to configure RLS in the Power BI service. In the Power BI service, open the published report and tap Settings. In the Security tab, select the role that you created, BranchRole. Add the users or groups you want to test.

    The creator's perspective is to be able to see all the data.

     

    I have another user in my workspace. Until I added it as an RLS role, he couldn't see the data for my reports.

     

    When I add it to the RLS role, he will only see the data that corresponds to his email address

     

    How to Get Your Question Answered Quickly

    Best Regards

    Yongkang Hua

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