Sub topic 10
Workspace roles that bypass RLS
This chapter assumes you can create a role with a DAX filter, you know how a security mapping table drives a dynamic role, and you have a Power BI workspace in the service. Here you will learn why a correctly built role can still show every row to some people, and how to avoid that.
Why RLS can be bypassed
RLS roles apply to people who only have permission to view content. Workspace roles are a different layer of access. Some of them grant edit rights on the semantic model, and anyone who can edit the model can also read all of its data. Power BI therefore does not apply RLS to them.
This is a common source of confusion. You can test a role, see it work, and then hear from a colleague that "the filter does nothing for me". In most cases the colleague holds a higher workspace role.
Which roles bypass RLS
Workspace roles apply to every item in the workspace, so the role someone holds there decides whether RLS applies to them.
| Workspace role | RLS enforced? | Reason |
|---|---|---|
| Admin | No | Can manage and edit everything |
| Member | No | Can edit content and publish |
| Contributor | No | Can edit content and publish |
| Viewer | Yes | Can only view content |
Two further cases bypass RLS even without a workspace role:
- Users who have Build or Write permission on the semantic model.
- The model owner, who can always see all rows of their own model.
In practice, RLS reliably protects Viewers and users who reach the report through an app or a direct share with only Read access.
How the access decision works
The diagram shows the check that happens when someone opens a report.
Checking who has access
To find out why a user sees too much, check these places in order:
- Open the workspace and choose Manage access. Note the user's role and any group that contains them.
- Open the semantic model's Manage permissions page and look for Build or Write grants.
- Check whether the user owns the model.
Remember that group membership counts. A user may be a Viewer by name but belong to a security group that holds the Contributor role. The higher permission wins.
Designing around the bypass
Plan your access model so that the people who must be restricted never get editing rights.
- Separate content creators from consumers. Creators go in the workspace as Contributor or Member. Consumers get Viewer, or access through an app.
- Publish an app for report readers. App permissions give Read access without any workspace role.
- Avoid granting Build permission to consumers unless they truly need to create their own reports. If they do, RLS still applies to Build users only when they do not hold a higher right, so check each case.
- Keep Admins to a small list. They see everything by design.
A useful habit is to test with a real account that has only the intended access. A model owner who uses Test as role sees the role's effect, but that does not prove an ordinary Viewer will see the same, because the owner's real permissions are not the ones being tested for.
Common mistakes
- Testing RLS only with your own admin account and concluding the role is broken.
- Adding a whole team as Contributor for convenience.
- Assuming a role assignment on the model overrides a workspace role. It does not.
Exercise
A user is a member of the RLS role "West Sales" and also holds the Contributor workspace role. She reports that she sees data for all regions. Is the role definition at fault? What should you change?
Show answer
The role is probably fine. Contributors can edit content, so RLS is not applied to them. To enforce the filter, change her workspace role to Viewer (or remove her from the workspace and share the content through an app), and confirm she has no Build or Write permission on the semantic model.
Exercise
Name two ways, other than a workspace role, that a user can end up seeing all rows of a semantic model.
Show answer
Having Build or Write permission on the semantic model, and owning the model. Membership in a security group that holds a higher workspace role also counts.