Sub topic 12
What RLS Does Not Cover
This chapter assumes you can create roles in Power BI Desktop, write static and dynamic filters, and assign members in the service. It covers what row-level security (RLS) does not restrict, so you can avoid giving users a false sense of safety.
What RLS actually does
RLS applies DAX table filter expressions to a semantic model when a person queries it. It removes rows from the tables the role filters, and the filters travel through relationships to related tables. That is all it does. It is a row filter, not a general access control system.
Scope limits you need to know
It does not hide columns or tables
A role that filters Region to West still lets the user see every column in the rows that remain. If a column holds salaries or personal data, RLS will not hide it. Use object-level security (OLS) to hide tables and columns. OLS is configured separately, in tools such as Tabular Editor.
It does not protect users who can edit the model
Users with the Admin, Member, or Contributor workspace role bypass RLS. Viewers do not. Users with Build permission on the semantic model can query it with their own tools, but their queries are still filtered by the roles they are assigned to.
It does not secure exported or copied data
RLS filters what the person is allowed to see at query time. After that, the person can export it, screenshot it, or paste it elsewhere. Exported data only contains the rows the user could see, but the copy is no longer protected.
It does not apply to every connection type
Support depends on how the report reaches the data. The table summarizes common cases.
| Scenario | RLS behavior |
|---|---|
| Import model in the service | Roles defined in the model are enforced |
| DirectQuery with a single sign-on source | The source can enforce its own security as well |
| Live connection to Analysis Services | Roles are defined and enforced at the Analysis Services source, not in Power BI |
| Report shared by "Publish to web" | Not suitable for private data, because the report is public |
Check current Microsoft documentation for your exact scenario, because support changes between releases.
It only filters, it does not mask
RLS removes whole rows. It cannot replace a value with "Hidden" or show a rounded figure. Totals also shrink for restricted users, so a restricted user sees a smaller total than an unrestricted user does. If the business needs everyone to see company-wide totals, RLS is the wrong tool for that visual. Put those totals in a separate model.
Some DAX is limited
Filter expressions must return a true/false result for each row, and they cannot use functions that reach across to other tables in unsupported ways. Keep role filters simple, and put the mapping logic in the security table you designed earlier.
-- Valid: a simple row-level comparison
[Region] = "West"Where the gaps show up
Compensating controls
Pair RLS with other controls to close the gaps.
- Use OLS for sensitive columns or tables.
- Give most consumers the Viewer role, and keep editing roles to a small group.
- Restrict export through tenant or report settings, and apply sensitivity labels.
- Keep private data out of public sharing.
Confirm what a user can see
Use a measure to check which identity the model sees. This matches the earlier testing chapter and helps you notice when a user is not being filtered.
Current User = USERPRINCIPALNAME()If the user is a workspace Member and sees every row, the cause is the bypass rule, not a broken filter.
Exercise
A role filters the Employee table to the signed-in manager's team. A colleague with the Member workspace role says they can see all employees. Another user, a Viewer, can see the salary column for their team and wants it hidden. What explains each case, and what fixes each?
Show answer
The Member sees all rows because the Admin, Member, and Contributor workspace roles bypass RLS. The fix is to move them to Viewer, or to test with a Viewer account. The Viewer sees the salary column because RLS filters rows, not columns. The fix is object-level security on that column.
Exercise
Why might a restricted user's company total be lower than the total a director sees, and is that an RLS error?
Show answer
It is expected behavior. RLS removes rows before aggregation, so totals are calculated only over the rows the user may see. If everyone needs the full total, put that figure in a separate model or report that does not use the role.