Back to all articlesEmbedded analytics needs an access rule for every number that crosses customers
Josh KatowitzJosh Katowitz
Data and BI

Embedded analytics needs an access rule for every number that crosses customers

Embedded analytics places dashboards, reports, and analysis inside another application, such as a customer portal or a software product, so people read the numbers where they already work. When the readers are your customers, per-customer access decides whether the product is safe to ship: each customer sees its own data and nothing derived from another customer's, including benchmarks and averages.

Microsoft's Power BI documentation draws the line between two audiences. In "embed for your organization", internal users sign in with their own Power BI credentials. In "embed for your customers", external users authenticate through the host app and need no Power BI license, and Microsoft notes that independent software vendors building applications for third parties typically use this second case. Internal embedding puts a sales dashboard inside the CRM or a cost report inside a finance tool. Customer-facing embedding is a software product that shows each client its usage, an agency that gives each brand its campaign results, or a category management firm that reports each supplier's sales by retailer. In that second group, an access mistake exposes one customer's data to another, and the example below leaks a competitor's sales while every row filter works as designed.

Eleven brands, correct row filters, and a peer average that leaks

Suppose you run a category analytics service for 11 consumer brands in three categories. The brands and their sales are made up for this example, and no customer's data is behind them. Each brand's embedded dashboard shows its own monthly sales next to a peer average: the average monthly sales of the other brands in its category. The row filter works, so no brand can see another brand's rows. Sales are in thousands of dollars.

BrandCategoryMonthly salesPeersPeer averageLargest peer's share of peer totalBenchmark shown
ASnacks4204220.035.2%Yes
BSnacks3104247.542.4%Yes
CSnacks2604260.040.4%Yes
DSnacks1804280.037.5%Yes
ESnacks1304292.535.9%Yes
FPet care2401160.0100.0%No
GPet care1601240.0100.0%No
HBeverages900350.040.0%Yes
IBeverages603330.090.9%No
JBeverages503333.390.0%No
KBeverages403336.789.1%No

Pet care has two brands, so brand F's peer average of 160 is brand G's exact sales. Counting the viewer in the average changes nothing. The average becomes (240 + 160) ÷ 2 = 200, and F recovers G's sales as 2 × 200 minus 240 = 160.

Beverages leaks less exactly. Brand I sees a peer average of 330, so its three peers sell 990 in total. If I assumes the two other small brands sell about what it sells, 60 each, it estimates the leader H at 990 minus 120 = 870, within 3.3% of H's true 900.

You adopt two rules. Show a peer average only when the viewer has at least three peers, and only when no single peer exceeds 50% of the peer total. The count rule withholds the benchmark from F and G, which have one peer each. The share rule withholds it from I, J, and K, where H holds between 89.1% and 90.9% of each peer total. Six of the 11 dashboards keep the benchmark. Brand H keeps it because each of its three peers holds 40% or less of a peer total of 150.

No standard sets those two thresholds; they are your own choices. Write them down, apply them in the query that builds the benchmark, and test them each time a category gains or loses a brand. If a third Pet care brand signs, each Pet care brand still has only two peers, and the count rule keeps the benchmark hidden until a fourth brand joins.

What row-level security covers, and what it leaves open

Broken access control has the most occurrences in the data behind the OWASP Top 10 for 2025. It ranks first, and 100% of the applications tested had some form of it. One example OWASP lists is viewing someone else's account by supplying its unique identifier. In an embedded dashboard, that identifier is a customer ID in a URL or a filter the browser can change.

Microsoft's Power BI Embedded security guidance describes the usual defenses. A vendor with a modest customer base can use one semantic model (the dataset and business logic a report reads) for all customers, with dynamic row-level security (RLS), a rule that filters rows by the viewer's identity. A vendor with thousands of customers can give each customer its own report and semantic model, then filter within each customer with RLS. Microsoft also notes that when an embed token supplies an identity, that identity's RLS permissions apply to the data.

Every one of those defenses works on rows. The peer average in the example is computed from rows the viewer may not see and then shown to that viewer, so it needs a rule of its own. Category shares and ranks belong to the same class of number.

Four ways to embed, and where each one enforces the filter

The four broad routes differ most in who enforces per-customer access.

RouteWhat the customer seesWho enforces per-customer accessFits when
Build charts in your own codeCharts your engineers design and maintainYour application code, on every queryAnalytics is a core product feature and engineers can own it
Embed a BI tool's dashboardsInteractive dashboards inside your pageThe BI tool, using an identity or filter your server signs into the embed tokenCustomers need to filter and drill into the same dashboards
Share a hosted link or portalA dashboard or report on its own page or framed in yoursThe hosting tool, through sign-in rules and the content each link servesCustomers read results and do not need to build their own views
Expose data through an API or file exportRows customers load into their own toolsYour API's authorizationCustomers have their own analysts and BI

Each route depends on your server to say which customer is viewing. Metabase states this directly in its guest embedding documentation: it does not know who is viewing a guest embed, so your server looks up the viewer and signs the customer's ID into the token as a locked parameter. Metabase then accepts that parameter only from the token and rejects any value the page tries to supply.

Sending each brand a monthly review

A dashboard answers the questions a brand already knows to ask. Some brands also need an analysis delivered to them, such as a monthly category review that explains why sales moved and what to look at next. The benchmark rules hold in that review too. The monthly rhythm also opens one more route to a competitor's figure: comparing the benchmark from one month to the next while brands join or leave the category. That comparison needs a rule of its own.

For the dashboard half of the job, BI embedding is mature. Power BI Embedded and Metabase both sign an identity or a locked parameter into the embed token, and both put interactive dashboards inside the host page. They fit when customers filter and drill into the same dashboards. An in-house build fits when analytics is the product itself and engineers can own every query.

Orion, the analytics platform, fits the review half, where each customer needs an analysis written for it. The analyst who knows each brand tells Orion how that brand defines sales, which retailers and categories it competes in, which benchmark rules apply, and what it asks first when sales move. Orion records all of that in Context pages and works from them each month. Some moves have a cause that only a person knows, such as a retailer that cut the brand's shelf space. For those, Orion asks the team and offers a Context update that an editor of the project applies or dismisses. Once one brand's review reads right, the team can ask Orion to build it into a Workflow. Orion tests the whole Workflow in a dry run, and it is saved only once the team approves the result. From then on, each run refreshes every brand's dashboard and report, so readers open the current version.

Delivery goes through Portals, which share dashboards, reports, and slide decks with readers outside the project. A portal is a public link, a protected link behind your SSO or a shared password, or an embed in another site. For an embed, only the origins you list can frame the content, and the host site's server signs a new token on each load. You name a portal after the audience it serves, such as one customer, and it serves only the content you add to it. Per-customer access therefore starts with which dashboards and reports go into each brand's portal. Portals must be enabled before use, and only tenant administrators manage them.

DMi Partners manages affiliate programs for brands. With Orion it built LuminAI, a self-service product where each brand explores its affiliate performance, asks follow-up questions, and gets scheduled reports and dashboards. DMi charges roughly a quarter of the price of its full-service management for LuminAI (the DMi Partners story). In a separate deployment, a category management firm offers Orion inside its own client platform for the brands it serves.

Pre-launch checks for per-customer access

  • Choose the tenant key, the one identifier that marks every row with its customer, and confirm that every table in the embedded content carries it or joins to it.
  • Enforce the filter in the database, the semantic layer, or a signed token, never in a parameter the browser sends.
  • Keep the signing key on your server. OWASP advises keeping stateless tokens short-lived to limit the window an attacker has.
  • List every number that crosses customers, such as benchmarks, ranks, and shares, and write a suppression rule for each.
  • Agree on each metric definition across customers. A peer average compares like with like only when every brand's sales follow one definition, and our post on semantic layers and business context describes how teams hold a definition in one place.
  • Decide who revokes a customer's access when a contract ends, and test that the old link stops working.
  • Create two test customers with known totals. Open the content as each, and confirm each sees only its own rows and only the benchmarks the rules allow.

In the example, every row filter was correct, and five of the 11 brands could still learn too much about a competitor. Give each number that crosses customers a written rule, an owner, and a test that runs again whenever a category gains or loses a brand.

Keep reading

View all