3.6 — Implement and Validate Dynamic Row-Level and Object-Level Security
DP-600 Domain 3 · Skill 3.6
What You Need to Know
Model security limits what report users see inside one semantic model. RLS filters rows. OLS hides tables or columns completely. Both must be implemented and tested.
Row-level security (RLS)
- Define roles in Power BI Desktop (Modeling → Manage roles), in the service's web modeling, or in Tabular Editor. Each role has DAX filter expressions on tables, and the filters flow through relationships.
- Static RLS: one role per value, for example
[Region] = "EMEA". It's simple, but you get many roles. - Dynamic RLS: one role that filters by the signed-in user:
-- On the UserRegion mapping table (UserEmail, Region), related to DimRegion
'UserRegion'[UserEmail] = USERPRINCIPALNAME()
A mapping table (user to region, manager to employees) holds the rules. Changing someone's access is a data change, not a model change. For hierarchies (managers see their whole chain), combine it with PATH and PATHCONTAINS.
- Assign members in the service: semantic model → Security → add users or groups to each role. Role membership isn't copied by deployment pipelines.
- Who RLS applies to: users with Viewer access, or with Read through sharing or an app. Workspace Admins, Members and Contributors have edit rights on the model, so RLS doesn't restrict them.
- With Direct Lake models, use a fixed-identity cloud connection so that the data source access is consistent while RLS is applied in the model.
Object-level security (OLS)
- OLS sets a role's permission on a table or column to None, so users in that role can't see the object at all. It doesn't appear in the field list, and queries that reference it fail.
- Define it with Tabular Editor (or TMDL or the XMLA endpoint), then publish. Assign members in the service as you would for RLS.
- Use it for sensitive columns (salary, personal data) or entire tables, such as a cost table for non-finance users.
- Visuals that use a secured object show errors for those users. Design reports with that in mind, for example with separate pages or field parameters.
Validate security
| Where | How |
|---|---|
| Power BI Desktop | Modeling → View as → choose roles, and optionally Other user with an email, to test dynamic RLS for a specific person |
| Power BI service | Semantic model → Security → role → Test as role, optionally as a specific user |
| DAX query tools | Connect with role or user impersonation (for example Roles= or EffectiveUserName= in the connection string from DAX Studio or SSMS through XMLA) and check the results |
Always test with an account that has only Viewer-level access. Testing as yourself (a workspace admin) shows everything.
Key Concept: Dynamic RLS = one role + USERPRINCIPALNAME() + a mapping table. OLS = hide tables or columns, set in Tabular Editor. Validate with View as or Test as role, as a viewer.
Exam Traps
- Testing RLS while signed in as a workspace Admin and concluding that it doesn't work
- Creating one static role per salesperson instead of one dynamic role
- Expecting OLS to be configurable in Power BI Desktop's Manage roles dialog (use Tabular Editor)
- Expecting role memberships to move with a deployment pipeline
Check your understanding
Practice Scenario
🔒 This practice scenario is part of Skillmarked Pro
The lessons stay free. Pro unlocks the other 17 DP-600 practice scenarios and the 50-question timed mock exam, plus everything for every other exam.
Launch Deal: first month €9.95, then €19.90/month. Enter code LAUNCH50 at checkout. Ends 1 December.
Cancel anytime. Or €199 a year, which saves 17%.
Not sure yet? Try 10 free mock exam questions.
Already Pro? Log in.
Sources
- Row-level security (RLS) with Power BI, Microsoft Learn
- Object-level security (OLS), Microsoft Learn
- Row-level security guidance in Power BI Desktop, Microsoft Learn
- USERPRINCIPALNAME function, Microsoft Learn