Prove which rows each report viewer can see
A manager can oversee several stores.
Prove which rows each report viewer can see
A manager can oversee several stores. Use a governed identity mapping and test each intended viewer’s effective rows, including a viewer without an assignment. A report page filter alone is an inadequate access boundary.
The recording associates a dynamic row-level role with the signed-in user and checks its behavior before assigning membership in the service.
Work through the decision
A viewer belongs to two assigned store groups, while a newly hired viewer has none. What should your test cover?
Check your reasoning
Verify the effective union of authorized rows for the first identity and an empty result for the unassigned identity. Test actual Viewer accounts after release and inspect effective membership, including any overlapping roles.
Decisions and tradeoffs
- Dynamic row-level security
- Apply an identity-based role filter and a tested filter path from assigned regions or stores to the fact. Unknown identities should match no authorized rows.
- Workspace Viewer role
- A user who only consumes workspace content should have read-level access. Model RLS applies to viewers; elevated workspace editors have different access.
- Build permission on a semantic model
- Grant Build deliberately when an authorized analyst must create their own reports from a shared model.
- Sensitivity label
- Apply the required classification to the item and inspect supported downstream exports; enforce actual access with permissions and security roles.
Rehearse the same test in Power BI
In a practice model with one region per row in Region and StoreSales on the many side, create a security role on Region. For this single-manager-per-region fixture, store the manager’s sign-in address on Region.
Region[ManagerUPN] = USERPRINCIPALNAME()
Publish the model, assign the appropriate users or group to the role, and compare the same matrix as each viewer. An editor’s workspace privileges change the test. For a many-to-many entitlement table, verify security-filter propagation explicitly before relying on its results.
Practice each guide skill
Work through these exercises in the order of the published guide. The checklist numbers are local references.
- Use Viewer for consumers and grant editing roles only to those maintaining the workspace. Test effective access.
- Share only the required report with a reader and inspect any inherited or group-based permission.
- Check a model reader’s permissions separately from an author who must build a thin report.
- Define a dynamic identity filter, verify relationship propagation and test the absence of an authorized mapping.
- Assign an eligible user or group to the role in the service. Test a viewer who belongs to overlapping groups.
- Classify the item with a sensitivity label and examine a supported export under the organization’s policy.
Official objectives for this lesson
Test the report as three different viewers
This local fixture models identity-to-store filtering. Predict each total, including the result for an unassigned account. In Power BI, repeat the checks with View as and actual Viewer identities in the service. Run with Python 3 and its standard library.
grants = [("lee@example.test", "W"), ("lee@example.test", "E"),
("sam@example.test", "E"), ("lee@example.test", "E")]
sales = [("W", 30), ("E", 12), ("S", 50)]
for viewer in ["lee@example.test", "sam@example.test", "new@example.test"]:
stores = {store for principal, store in grants if principal == viewer}
visible = [amount for store, amount in sales if store in stores]
print(viewer, len(visible), sum(visible))
Check the result
lee@example.test 2 42 sam@example.test 1 12 new@example.test 0 0
Duplicate grants do not multiply sales. The unassigned identity sees no rows. In the actual model, check the relationship path from the security mapping to the fact and test under read-only access.
Related lesson · Give analysts the access their work requires
Prove which rows each report viewer can see quiz
Answer 3 questions. Check each answer for an explanation.
Worked example · Prove which rows each report viewer can see