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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Unauthorized Data Access in Power BI RLS due to RI Violation

I encountered a scenario in Power BI where Row-Level Security (RLS) can be bypassed due to a combination of referential integrity (RI) violations, allowing unauthorized access to data.

This issue arises in specific RLS setups where:

  • The RLS table filters data using ProductID and UPN (email/user).
  • The relationship model introduces a bridge table, and security is applied through relationships with Apply security filter in both directions enabled.
  • There is incomplete referential integrity (i.e., not all ProductIDs exist in all tables involved).

This model grants access to data the user should not see.

 

My Observation

If a user has RLS access to any product that is part of the RI violation (i.e., it does not exist in the bridge table or product dimension), Power BI unexpectedly grants access to other products beyond their RLS scope - including products they are not authorized to see.

 

Repro Steps

 

1. RLS Table (User Permissions)

UPNProductID
alice@example.com1001
bob@example.com1002
bob@example.com1003
charlie@example.com1004
charlie@example.com1006
diana@example.com1005
diana@example.com1006
diana@example.com1001

 

2. Bridge Table (ProductBridge)

ProductID
1001
1002
1003
1004

 

3. Product Dimension Table (Products)

CategoryIDCategoryNameBrandIDBrandNameProductIDProductNameProductColor
1Electronics101Sony1001HeadphonesBlack
2Appliances102Samsung1002MicrowaveSilver
3Furniture103IKEA1003TableBrown
4Clothing104Zara1004JeansBlue
5Sports105Nike1005Soccer BallWhite
6Toys106Lego1006Brick SetMulticolor
7Books107Penguin1007NotebookYellow

 

4. Model Setup (see attached diagram):

otets_0-1743410328739.png

RLS → ProductBridge (many-to-one, both directions, security filter ON)

ProductBridge → Products (one-to-many, single directions)

5. Tested Role Logic:

RLS Role: RLS[UPN] = USERPRINCIPALNAME()

 

Test Case:

User: diana@example.com
Expected access:

  • Products: 1001 (only one that exists in the bridge table)
    Actual access:

  • Products: 1001, 1005, 1006, 1007 (!)

otets_0-1743411699618.png

 

User: charlie@example.com
Expected access:

  • Products: 1004
    Actual access:

  • Products: 1004, 1005, 1006, 1007

otets_1-1743411722204.png

 

It appears that once a user has access to any product not found in the bridge table, the relationship chain breaks in such a way that the entire "missing" portion of the Product table is exposed, ignoring RLS enforcement altogether.

This suggests the RLS filter is not safely handling RI violations — rather than blocking or excluding such records, Power BI seems to allow overly permissive access through broken links.

P.S. I would like to provide a Power BI report file demonstrating the issue, but I haven’t figured out how to do that yet - the platform indicates that .pbix and .zip file types are not supported for upload.

 

P.P.S. Please don’t suggest resolving this issue by simply fixing the referential integrity violations in the data. I fully understand the importance of maintaining RI to ensure consistent and accurate results. However, this report is not about bad data hygiene — it’s about how RLS behaves when RI is broken, intentionally or unintentionally.

Status: New