Row-level security, or RLS, restricts which rows of data a person can see in a Power BI semantic model. Done well, one report serves many audiences, each seeing only its own region, store, or team. Done badly, it leaks data, or becomes a maintenance burden nobody wants to touch.
Static roles versus dynamic roles
A static role has a fixed filter, such as Region equals “Central.” You create one role per audience and add people to each. It is simple and works for a handful of groups. It does not scale. Every new region means a new role, and the filters are scattered across the model.
A dynamic role looks up the current user. A security table maps each user, by their sign-in name or email, to the values they may see. A single role filters the model using that table, typically with USERPRINCIPALNAME. When someone changes teams, you update a row of data, not the model.
A design that holds up
- Build a security table with one row per user and permitted value, for example user and region.
- Relate it to the dimension it protects, not to the fact table directly, so the filter flows through the star schema.
- Create one role that filters the security table by the signed-in user.
- Keep the security table in your governed data, owned by someone who knows who should see what.
- Source the mapping from an identity group or HR system where you can, rather than hand-maintaining a spreadsheet.
The traps
The most common mistake is forgetting who bypasses RLS. Roles apply to people with the Viewer role in a workspace, or to users who have access to the content through an app or direct share. Members of the workspace with higher roles, such as Admin, Member, and Contributor, can see all the data in the model. If your security depends on RLS, be strict about who gets those roles.
Another trap is the relationship direction. A security filter flows along relationships. Bidirectional relationships can widen what is visible in unexpected ways, and they can slow queries. Keep the protected path clean and single-direction wherever you can, and be sure that the dimensions you filter actually reach the facts.
A third is the person who is in no role at all. Decide what a user with no matching rows should see. In a dynamic setup, the usual answer is nothing. Make sure that is what happens, and that the message a user sees is understandable.
Combine with object-level security when needed
RLS hides rows. Sometimes you need to hide a table or column, such as salary or margin, from certain people. Object-level security does that in the model. Plan both, because a person can be allowed every row of the sales data but not the cost column.
Test, then test again
Power BI Desktop and the service let you view the report as a role, and as a specific user. Use both. Build a short test script: sign in as a person from each group and check totals against a known figure. Test edge cases: a user in two regions, a user in none, and a user with a name that has changed. Keep the script and rerun it whenever the model or the security table changes.
Keep Direct Lake and other modes in mind
How security is enforced can differ by storage mode and by where it is defined. Check the current documentation for your mode before assuming that a role in the model is the only gate. With data in a lakehouse or warehouse, security at the source may also apply, and the two should agree.
Share through groups and apps
Give access with security groups, not individuals, and publish through apps so audiences get a controlled view. Review membership on a schedule. Access that was right a year ago is often wrong now.
Plan for change
People move teams, regions are reorganized, and acquisitions add new hierarchies. Security that depends on a table of mappings handles this gracefully if the table is maintained. Decide who updates it, how quickly changes must take effect, and how you will know when it is stale. A quarterly review of who can see what, signed off by the data owner, catches the drift that otherwise accumulates unnoticed.
Good RLS is boring: one role, one security table, a test script, and an owner. If any of those is missing, that is where to start.