Forum Discussion
RLS not working for only one table
- 1 year ago
I managed to solve this issue by doing a workaround because for some reason RLS doesn't seem to work with bidirectional many-to-many relationships. That was the problem. So to "solve" this, I needed to create a bridge table with two columns: one for the distinct ID that would relate to all the other tables, and another for the RLS Code. Then I applied RLS only to this bridge table, and it worked.
Hi nok ,
Thank you for reaching out to the Microsoft fabric community forum.
Based on your explaination, the problem appears to be structural rather than related to RLS, since Table_E displays no data even when using a simple RETURN TRUE() rule. Because Table_E is linked to four child tables through bidirectional many-to-many relationships, it's possible that filters from these child tables are unintentionally blocking rows in Table_E. To check this, try temporarily removing or switching those relationships to single-direction, then apply the TRUE() RLS rule again to see if the data appears. If it does, this suggests the issue is with the relationship setup rather than the RLS code.
To achieve more stability and scalability, it's recommended to restructure your model so that _UserManagement serves as a dedicated dimension or bridge table, establishing relationships with your target tables. Applying RLS at this level can help prevent issues that may arise from relying only on DAX-based virtual joins, which can be inconsistent in more complex models.
Hope this helps. Please reach out for further assistance.
Thank you.