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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
shwet
Frequent Visitor

Row Level Security on Composite Model

Hello,

 

In my report, I have connected to SSAS cubes data, Power BI dataset and Sharepoint data.
1.Imported one table of suppliers with Supplier ID from SSAS cube and direct queried other tables from SSAS cubes and created connection on common Key i.e. Supplier ID.
2. Also connected Power BI datasets and Sharepoint data to the Supplier table of SSAS cube.
3. Imported one table of userinformation from other DB where we have users email ID on which I am implementing RLS and connected this table to Suppliers table on Supplier ID key.

This is how I made a modelling.

Implemented RLS on Email field, so that user who is logging in should see only his/her data and not the entire reports data.

 

I dont understand if there is a issue with modelling or the data sources storage mode as RLS is not working on the report.

 

Please suggest some solution to this. I am stuck at thi issue since very long and its urgent requirement. 

 

Thank You!

5 REPLIES 5
ABI_Rufino
Frequent Visitor

@shwet,

 

I was able to figure it out. When you have a connection to a Power BI dataset on a composite model, it's a limitation from the tool that you cannot make RLS work on it.

RLS must be created on the dataset that you are connection with, then it will work on your composite model.

 

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-composite-models#working-with-a-c...

 

"RLS rules will be applied on the source on which they're defined, but won't be applied to any other semantic models in the model. RLS defined in the report won't be applied to remote sources, and RLS set on remote sources won't be applied to other data sources. Also, you can't define RLS on a table loaded from a remote source, and RLS defined on local tables will not filter any tables loaded from a remote source."

 

Regards,

Bernardo Rufino.

hsantosh
Helper I
Helper I

I am also facing same issue, my report embedded in application, in power BI service its working but not in application. throwing error

An unexpected error has occurred!

ABI_Rufino
Frequent Visitor

I have the same exact problem.

 

My scenario is:

 

  • Power BI Premium Workspace;
  • Composite model with:
    • Power BI Dataset Direct Query (AS) - let's call it 'base dataset'
    • Excel file on Sharepoint folder;
      • Only 2 columns: user email and the region that i want to filter;
    • The excel file relationship is with the dimension as a many-to-many, one-directional (excel filters the dimension);
  • RLS rule is simple: [user_email] = USERPRINCIPALNAME(), so when user is logged to PBI Service the excel table is filtered and it SHOULD filter the dimensions table, and them filtering the fact table;

RLS works fine if i import the excel file to the 'base dataset'. But i don't want that because it's a shared dataset and RLS will apply only to a few reports, not all of them. So for those that will apply, i've created this composite model, but for some reason the RLS rules are not working (the excel table is being filtered, but the filter is not propagating).

  •  

Hello @ABI_Rufino 
my use case is exactly like yours. Same steps but still no solution. Did you find a solution to propagate the filter to the direct query tables?
Thank you in advance for your eventual reply

 

Hi,
RLS is still not working for me on composite model, but we have implemented alternate solution which is filtering report by passing query string parameter. Our report is embedded in the external portal so we have added query string parameter in the embed link and its working for the users, we have kept is as a temporary solution for now. You can refer the link below:
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.