Forum Discussion
RLS not working as expected
I have a data model / report with a wide distribution list. Recently we experienced a critical error with our dynamic RLS setup. It has been working perfectly for months. We narrowed it down to Companies, who has not been properly registered in the Company master table, but somehow exist in our Security/ User Bridge. Please follow this illustration of the data model RLS filtering as [email protected] opens the Power BI App:
As you can see, [email protected] is logging into the Power BI app, and the User table is properly filtered down to only his username. The UserBridge is also correctly filtered, though the corresponding CompanyId in this table, doesn't find a match in the Company table. Thus the Company table throws a blank filter to the Service table, which again, at least it SHOULD propagate to the Billing table. However as you can see the billing table returns a few lines with blank ServiceId values, which is expected due to the omission of a CompanyID in the Company table (and the fact that the Billing table, while not intended, contains rows with blank ServiceIds), BUT it also returns a subset of seemingly random ServiceId lines. How this is even possible, is simply beyond my understanding of how RLS works in Power BI. I get the same test result offline in Power BI Desktop.
Could someone point me in the direction of an answer to this, it would be most appreciated, as this is critical for us to understand ( While we can eliminate the issue, seemingly by synconizing the UserBridge and Company tables' CompanyIds ).
3 Replies
- lbendlinSuper User
What do you need the User table for? Can a user be a member of multiple companies?
- AnonymousNot applicable
It is not mandatory, the userprincipalname filter could be placed on the UserBridge[Email] with the same result.
- AnonymousNot applicable
I should probably raise this as a support issue..