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, DataVitalizer . Thanks for the reply!
1. I checked everything, and the RLS_AccessCode column is the same as all the others.
2. Table_E (like all the other tables in my report) doesn't have a direct relationship with _UserManagement. The "connection" between them is only made in the RLS code. Is this a problem?
3. I used this code, but the data still doesn't appear for Table_E9. Even when I delete all the RLS code from this table and leave only the TRUE() function, it doesn't work, and no data from this table appears. Very weird.
nokI suggest temporarily create a new table visual with just Table_E[PrimaryKey] or any non-filtered column and:
- Remove all filters, all visuals, all slicers.
- Use no measures, just raw data.
- Apply TRUE() in RLS role.
- Preview as Admin.
If that doesn't work then the table is not showing because of something structural in the model, not because of RLS filtering logic.
Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡