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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Erkko
Frequent Visitor

Power BI Embedded for customers security question

Hi! 

 

We are currently working a project where we embed Power BI in our app for customers. We have all the data in one table and my concern is that is it possible to provide the customer ID from our app with embed token and apply automatically some kind of locked filter to show only data mapped to that provided customer ID? 

 

Example of the case: 

Customer A signs in our app and navigates to page where Power BI embedded is. Power BI embedded automatically filters the data belonging to Customer A and hides everything else. 

Customer B signs in the same time and sees only data belonging to Customer B.

I'm new at this so any kind of help is more than welcome. Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Erkko,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

In Power BI Embedded you can enforce multi‑tenant isolation by combining a single Dynamic Row‑Level Security (RLS) role in the dataset with an embed token that carries the viewer’s Customer ID. You create one RLS role in Power BI Desktop—e.g. CustomerRole whose filter is [CustomerID] = CUSTOMDATA(). When each user signs in to your SaaS app, your back‑end calls GenerateToken and, in the effectiveIdentity, supplies that role plus a customData value equal to the user’s Customer ID (or a comma‑separated list of IDs for resellers). Because CUSTOMDATA() is populated from the signed token, Power BI automatically filters the dataset so the report renders only the rows whose CustomerID matches the value in the token—no extra code or

slicers required, and users cannot tamper with the filter. This lets a single published report securely serve every customer while minimizing maintenance and license overhead.

 

Thank you & best regards,
Prasanna Kumar

View solution in original post

4 REPLIES 4
FabricISV
Regular Visitor

does this work for MS fabric Direct Query or Direct Lake ? 

Erkko
Frequent Visitor

Thank you for the answer! We will test this one 🙂

Anonymous
Not applicable

Hi @Erkko,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

In Power BI Embedded you can enforce multi‑tenant isolation by combining a single Dynamic Row‑Level Security (RLS) role in the dataset with an embed token that carries the viewer’s Customer ID. You create one RLS role in Power BI Desktop—e.g. CustomerRole whose filter is [CustomerID] = CUSTOMDATA(). When each user signs in to your SaaS app, your back‑end calls GenerateToken and, in the effectiveIdentity, supplies that role plus a customData value equal to the user’s Customer ID (or a comma‑separated list of IDs for resellers). Because CUSTOMDATA() is populated from the signed token, Power BI automatically filters the dataset so the report renders only the rows whose CustomerID matches the value in the token—no extra code or

slicers required, and users cannot tamper with the filter. This lets a single published report securely serve every customer while minimizing maintenance and license overhead.

 

Thank you & best regards,
Prasanna Kumar

Hi! We got everything working with the normal PBI reports. However we need support to embed also paginated reports in app. We have looked Use row-level security when embedding paginated reports - Power BI | Microsoft Learn this document when applying the settings. We pass "identities": [ username: ] the CUSTOMDATA() value so that the paginated report would work but instead the customdata() value, the report displays some Power BI session GUID for some reason. Do you have any ideas how to get the paginated report embedding with RLS work properly? 

 

Thank you very much in advance!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors