Insights / RLS in Power BI / Part 6

Part 6 of 20 · Build it

Power BI Embedded RLS with CUSTOMDATA

By Zohal Zahir · November 2026 · From the series Who sees what: RLS in Power BI

The problem. One report has to serve hundreds of customers, each seeing only their own data, and none of them are Power BI users.

Why. In a normal report you add people to RLS roles by email. In an embedded app there are no Power BI users to add. So instead of identifying the person, you pass the tenant.

How it works.

  1. The user signs in to your app.
  2. Your backend looks up which tenant they belong to, from your own database.
  3. It generates the embed token with the role name and customData set to that tenant.
  4. The report loads, and the role filters every query.
Customersigns in toyour appYour backendlooks up tenantfrom your databaseEmbed tokenrole: TenantFiltercustomData: "147"Power BI report[CustomerId] =CUSTOMDATA() → 147login onlyNever let the browser send the tenant ID.Change 147 to 148 and you'd see another customer's data.
-- role TenantFilter
[CustomerId] = CUSTOMDATA()

The rule that keeps it safe: the user never sends their tenant, only their login. Your backend decides the tenant. If the browser could send it, someone changes 147 to 148 and sees another customer's numbers.

Worth knowing:

  • Always pass the identity and role in the token. Without them, a report on an RLS model fails to load (service principal), or shows all data (master user account).
  • Opened outside your app, CUSTOMDATA() is blank, so the report shows nothing.
  • On DirectQuery, CUSTOMDATA() isn't supported in role rules. Pass the customer ID as the username instead, with [CustomerId] = USERNAME().

Check before go-live

  • The tenant ID comes from your backend, never from the browser
  • Every embed token includes the role and identity
  • A test with two tenants shows each only its own data

Want a second pair of eyes on your own model? The RLS review checks your roles, relationships and workspace access against this checklist, at a fixed price.

Found this useful? Share it.Tag Zohal Zahir on LinkedIn so she can say thanks.

Want your RLS checked on a real model?

Book a free 30-minute call. Tell us how your model and workspaces are set up, and we'll tell you where access could leak and what fixing it would involve.

Book a free call30 minutes. Reply within two business days