Quick answer
To restrict a Power BI report by region or department, enforce row-level security (RLS) in its semantic model—not through a visible slicer or saved report view. Keep restricted consumers out of workspace Admin, Member and Contributor roles, then verify access with both role simulation and actual consumer accounts. Those elevated workspace roles are not restricted by RLS. (learn.microsoft.com)
This walkthrough uses Power BI Desktop, an Import semantic model and the Power BI service, with internal organizational users accessing a shared workspace as Viewers. You need permission to publish the model, manage its security and provision suitable test accounts, plus licensing appropriate to your deployment.
The tables below are synthetic. Their totals are expected test outcomes, not results from a tested customer deployment.
1. Separate report presentation from data authorization
A regional sales report has two different requirements:
- Presentation: open the report with West selected.
- Authorization: prevent a West-only user from querying East sales.
Treat a slicer or saved view as presentation. Microsoft documents RLS as model-level rules and role mappings; without model roles, users permitted to query the model can access all its data. A saved regional perspective does not establish that boundary. (learn.microsoft.com)
Write the authorization requirement before building visuals:
“West regional managers may read West sales only. East regional managers may read East sales only. Approved cross-region managers may read both. Unmapped consumers must receive no sales rows.”
Also define what this rule does not protect. RLS restricts rows, not access to individual columns, tables or measures. If someone may see a transaction but must not see a sensitive field within it, investigate object-level security or a separately designed model. (learn.microsoft.com)
Practical check: Ask whether the requirement would still hold if the user opened a different report connected to the same model. Your authorization design should not depend on one report page looking correct.
2. Design consumer permissions and roles together
For this deployment, assign restricted consumers the workspace Viewer role. Keep model editors separate. Workspace Admins, Members and Contributors have permissions that bypass RLS; assigning those users an RLS role does not remove their elevated access. (learn.microsoft.com)
Check group-derived permissions, not just direct assignments. A person belonging to several workspace groups receives the highest permission level supplied by those groups. A direct Viewer assignment therefore does not neutralize Contributor access inherited elsewhere. (learn.microsoft.com)
At semantic-model level:
| Effective permission | RLS consequence |
|---|---|
| Read, with membership in an RLS role | Access follows the role’s rules |
| Read and Build, with role membership | RLS still applies |
| Write | The user can read model data regardless of RLS role membership |
| Read or Build, but no RLS role membership | The user cannot read the RLS-protected model’s data |
These distinctions come from Microsoft’s semantic-model permission rules. Build is not the same as Write. (learn.microsoft.com)
Use one dynamic role, named RegionalReader, for the example. Avoid assigning a consumer to overlapping “restricted” and “all-access” roles: multiple RLS roles are additive, granting the union of their allowed rows. A restrictive role is not an overriding deny. (learn.microsoft.com)
Practical check: Record each test account’s effective workspace role, semantic-model permissions and RLS memberships in one access worksheet.
3. Create a small dataset with unmistakable expected results
Start with a fixture small enough to inspect completely. Create these three Import tables.
Region
| RegionKey | RegionName |
|---|---|
| W | West |
| E | East |
Sales
| OrderID | RegionKey | Amount |
|---|---|---|
| W-101 | W | 100 |
| W-102 | W | 150 |
| E-201 | E | 200 |
| E-202 | E | 50 |
UserRegionAccess
| UPN | RegionKey |
|---|---|
| [email protected] | W |
| [email protected] | E |
| [email protected] | W |
| [email protected] | E |
The addresses are placeholders. Replace them with the sign-in identifiers of provisioned test accounts. Do not create a mapping for your fourth account, the unmapped consumer.
Create an active, one-to-many relationship from Region[RegionKey] to Sales[RegionKey], with single-direction filtering from Region to Sales. For the explicit lookup rule in the next section, leave UserRegionAccess disconnected. Power BI relationships control filter propagation; inspect their direction and active status rather than assuming an automatically created relationship is correct. (learn.microsoft.com)
Your expected outcomes are:
| Consumer | Allowed orders | Expected amount |
|---|---|---|
| West manager | W-101, W-102 | 250 |
| East manager | E-201, E-202 | 250 |
| Cross-region manager | All four | 500 |
| Unmapped consumer | None | No sales amount |
Notice that West and East have identical totals. That is intentional: a total-only test could miss an incorrect regional assignment. Validate order IDs and region keys, not merely the headline number.

4. Apply an explicit default-deny identity rule
In Desktop, open Modeling → Manage roles, create RegionalReader, and use the DAX editor to add a filter to Region. After publishing, assign users to that role through the semantic model’s Security page in the service. Desktop role definitions and service role membership are separate steps. (learn.microsoft.com)
Use this proposed rule on Region:
VAR SignedInUPN = USERPRINCIPALNAME()
VAR CurrentRegion = Region[RegionKey]
RETURN
SignedInUPN <> ""
&& CONTAINS(
UserRegionAccess,
UserRegionAccess[UPN], SignedInUPN,
UserRegionAccess[RegionKey], CurrentRegion
)
USERPRINCIPALNAME() returns the connection’s user principal name. CONTAINS returns true when the specified values occur together in the referenced table; otherwise it returns false. Here, a region is allowed only when the mapping contains that user–region pair. (learn.microsoft.com)
Add a second filter, in the same role, to UserRegionAccess:
[UPN] = USERPRINCIPALNAME()
&& [UPN] <> ""
This limits the mapping table itself to the current user’s entries. Do not leave the full entitlement list available merely because it is absent from report visuals. The second rule uses the same documented identity function and row-filter evaluation mechanism. (learn.microsoft.com)
For the synthetic West account, the Region rule matches W and rejects E. With the active Region-to-Sales relationship, the intended result is two West orders. An unmapped account matches neither region. These are expected consequences of the proposed expression and model, which you must verify before release. (learn.microsoft.com)
Important deployment limit: This particular expression is for Import mode. Microsoft does not support CONTAINS in DirectQuery RLS rules. Do not copy it unchanged into a DirectQuery deployment. (learn.microsoft.com)
Store the actual returned UPN, not an assumed email alias. Microsoft notes that the sign-in UPN and email address can differ. (learn.microsoft.com)
Before publishing, check that:
- Region keys are unique and nonblank.
- Every sales region exists in
Region. - Every entitlement references a valid region.
- UPN values have no accidental leading or trailing spaces.
- Cross-region access is represented by explicit approved entries.
- No fallback expression grants all rows when a mapping is missing.
5. Test allowed views, denied views and real permissions
Create a validation page with:
- A detail table containing OrderID, RegionKey and Amount.
- A regional summary.
- A temporary identity card using
USERPRINCIPALNAME().
Run three test stages.
Stage A: Desktop simulation. Use Modeling → View as, select RegionalReader, and test each intended identity. Microsoft recommends testing both expected and unexpected identity values for dynamic rules. (learn.microsoft.com)
Stage B: Service simulation. On the semantic model’s Security page, use the role’s Test as role option and choose the relevant identity through Now viewing as. This feature tests reports, not dashboards. (learn.microsoft.com)
Stage C: Actual consumer sessions. Sign in with separately provisioned test accounts in separate browser profiles. Use their real effective permissions and the normal report access path.
For each account:
- Confirm the displayed identity.
- Clear presentation filters.
- Compare the detail rows with the expected-order table.
- Try selecting an unauthorized region.
- Inspect every report page, including detail and drillthrough pages.
- Repeat on any other report sharing the model.
For a West-only account, selecting East must never reveal E-201 or E-202. A blank result is acceptable for that selection; East sales appearing is a failure.
Test two different denial cases:
- In
RegionalReader, but absent from the mapping: expect no sales rows from the proposed rule. - Has consumer access, but belongs to no RLS role: expect no access to the protected model’s data. The interface may show an error rather than an empty report. Do not require a particular visual message as the security criterion. (learn.microsoft.com)
Keep account, timestamp, model version, expected rows and observed rows in the test record. Simulation checks the rule; real-account testing checks whether the deployed permissions match your design.
6. Check exports and alternate reporting paths
Do not stop when the dashboard looks correct.
For each account, attempt every data route you intend to permit:
| Route | Check |
|---|---|
| Summarized export | Only authorized regional values appear |
| Underlying-data export, when enabled | No unauthorized order IDs appear |
| Analyze in Excel, when permitted | Queries remain restricted to approved regions |
| Another report using the model | The same regional boundary holds |
Microsoft states that visual data exports respect applied RLS. Export availability also depends on permissions and report or administrator settings; administrator settings override conflicting report export settings. A missing Export button therefore does not prove the RLS rule works. (learn.microsoft.com)
Viewers with Build permission remain subject to RLS when using Analyze in Excel. Do not promote a consumer to Contributor merely to solve an Excel access request. (learn.microsoft.com)
Test with cleared presentation filters so an export cannot pass simply because a slicer happened to hide unauthorized rows.
Also agree on how authorized exported files may be stored and shared. Restricting which rows Power BI returns is a different question from governing copies after download.
7. Resolve common failures and use a release checklist
When results are wrong, investigate in this order:
- Everyone sees everything: inspect effective workspace and semantic-model permissions, then confirm the published model contains RLS roles.
- One user sees too much: check overlapping RLS memberships and extra entitlement rows.
- An approved user sees nothing: compare the actual UPN with the loaded mapping and confirm role membership.
- Details are restricted but a summary is not: inspect separately stored summary or aggregation tables. Microsoft warns that RLS must consistently filter aggregation and detail data; an unfiltered summary table can deliberately expose wider totals. (learn.microsoft.com)
Use this pre-release checklist:
- The business has approved the access matrix.
- Restricted consumers have no effective model Write permission.
- RLS roles and service memberships are present.
- Mapping values match actual test-account identities.
- Active relationships carry restrictions to every relevant fact table.
- West, East, cross-region and unmapped cases match expected detail rows.
- Unauthorized slicer selections reveal no unauthorized data.
- Exports and permitted Excel access have been checked.
- Summary tables and other connected reports have been reviewed.
- An entitlement owner and access-change procedure are documented.
Finally, test revocation: remove a synthetic entitlement, refresh the imported mapping, then repeat the actual-account check. Require the removed region to disappear before marking the change complete.
The release decision should rest on verified allowed and denied rows—not a reassuring default filter.