Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jonimatix_pp
Frequent Visitor

Power BI Embedded row level security with multiple roles

Hello,

 

We need to implement Power BI row level security in our Embedded environment. 

A user can have multiple brands associated for ex. BrandA, BrandB

 

Can anyone please highlight how RLS should be configured in PBI dashboard, and how it should be passed? 

 

Does the call need tobe in this format?

 

{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "BrandA", "BrandB" ],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}

 

 

And how does the filter need to be applied from the Dashboard?

 

Thank you

 

2 REPLIES 2
jonimatix_pp
Frequent Visitor

Hi @v-zhangti ,

 

Thanks for your input.

 

What I need to achieve is using 1 security role for Brand. Meaning if there is a new brand I dontn eed to change all dashboards to include the new security role for the new brand. 

I need to have 1 security role for Brand and from PBI Embedded, pass a list of brands the user can see. Is this possible to achieve, for example pass a list of brands like "BrandA|BrandB"? What is the best approach? Can you show example/s please?

 

Thanks

 

 

v-zhangti
Community Support
Community Support

Hi, @jonimatix_pp 

 

To implement row-level security in Power BI, you'll need to create roles that define the filters that should be applied to each user or group.

 

In your case, you'll want to create a role for each brand, and define the appropriate filter for each role. For example, the BrandA role would have a filter that limits the data to only the rows where the brand is equal to "BrandA", and the BrandB role would have a filter that limits the data to only the rows where the brand is equal to "BrandB".

 

Once you've created the roles and defined the filters, you can assign each user or group to the appropriate role. This can be done in the Power BI service by going to the "Security" tab and adding users or groups to the appropriate roles.

 

To pass the user's credentials to the Power BI dashboard, you'll need to use the Power BI Embedded API. Specifically, you'll want to use the "setAccessToken" method to pass the user's access token to the dashboard. This will allow the dashboard to apply the appropriate row-level security filters based on the user's credentials.

 

I hope that helps! Let me know if you have any further questions.

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors