Apache Superset and Metabase can both show each customer of your SaaS app only its own rows in an embedded dashboard. In Superset, your server asks Superset’s API for a guest token that names the dashboard and carries row level security rules, which are SQL clauses that Superset adds to the dashboard’s queries. The @superset-ui/embedded-sdk package then shows the dashboard in an iframe. In Metabase, your server signs the token itself with a key it shares with Metabase. Guest embeds lock the customer’s ID as a parameter on every plan, including the free open-source edition. SSO embeds on Pro and Enterprise sign each customer in, and row and column security filters every question they build in the query builder by their tenant.
Superset is free under the Apache License 2.0, and you host and upgrade it yourself. Preset, the hosted Superset service, sells embedded dashboard viewer licenses starting at $500 a month for 50 viewers. Metabase’s open-source edition is free to self-host, guest embed viewers don’t count as users on any plan, and Pro costs $575 a month with 10 users included. This page compares Superset 6.1 and Metabase 65 on tenant isolation, server code, cost for many viewers, self-hosting, upgrades and AI. Prices and plans were checked on November 12, 2026.
How does each tool keep each customer’s data apart in an embed?
In both tools, a token that your server signs or requests carries the customer’s identity, so the browser never chooses which customer it is. The tools differ in what the token carries, where the rule lives and what the viewer can do.
Superset: row level security rules in the guest token
Superset’s embedded SDK needs the EMBEDDED_SUPERSET feature flag, which is off by default. Turn it on in superset_config.py, as Superset’s feature flags and embedding pages show:
# superset_config.py
FEATURE_FLAGS = {
"EMBEDDED_SUPERSET": True,
}
With the flag on, each dashboard’s menu offers Embed dashboard. There you list the Allowed Domains that may embed the dashboard, and you copy the embedded dashboard ID that the SDK needs. Before it serves the embedded view, Superset checks the request’s Referer header against that list, and its docs note that an empty list allows any origin. Replace the default GUEST_TOKEN_JWT_SECRET too, because the SDK’s README says that its default value must be changed in production. Then let your app’s domain frame Superset. Talisman is on by default, and it makes /embedded/<uuid> answer with X-Frame-Options: SAMEORIGIN, so browsers refuse to show the dashboard inside your app. Copy TALISMAN_CONFIG from Superset’s config.py into superset_config.py, and add your app’s origin under frame-ancestors in its content_security_policy.
Your server then asks Superset for a guest token. The request names the user, the dashboards that the token opens and a list of rls rules, as in this example from the SDK’s README:
{
"user": {
"username": "stan_lee",
"first_name": "Stan",
"last_name": "Lee"
},
"resources": [{
"type": "dashboard",
"id": "abc123"
}],
"rls": [
{ "clause": "publisher = 'Nintendo'" }
]
}
Each clause is SQL text that Superset adds to the WHERE clause of the dashboard’s queries, and several clauses are joined with AND. In a SaaS app, your server writes the customer’s rule here, such as customer_id = 42, from the signed-in user’s session. A rule without a dataset ID applies to every dataset that the dashboard queries, while a rule with one applies only to that dataset. So when your tables name the tenant column differently, give each dataset its own rule.
To refuse a guest token request whose rules look wrong, set GUEST_TOKEN_VALIDATOR_HOOK to a function. When it returns False, the endpoint answers with HTTP 400, and the example in Superset’s config.py checks for exactly one rule that contains tenant_id=. The hook doesn’t check tokens that your app signs itself. Guest tokens last five minutes by default, set by GUEST_TOKEN_JWT_EXP_SECONDS, and the SDK calls your fetchGuestToken function again five seconds before each token expires. The guest gets the role named in GUEST_ROLE_NAME, which is Public unless you change it. That role starts with no permissions, so the embedded dashboard fails until you give it some. Set PUBLIC_ROLE_LIKE = "Public" and run superset init to sync Superset’s read-only dashboard permissions to it, or point GUEST_ROLE_NAME at a role that you configure yourself.
Metabase guest embeds: a locked parameter in a signed JWT
Guest embeds work on every Metabase plan, including the free open-source edition. You publish a dashboard as a guest embed and set its customer filter to Locked. Your server then puts the customer’s ID in the params object of a JWT and signs it with the embedding secret key. Metabase applies the filter before anything reaches the browser. A locked filter has no widget, and because its value comes from the signed token, the viewer can’t change it.
Metabase’s embedding parameters page sets four rules for that token:
- Every token has to include every locked parameter. If one is missing, Metabase refuses the request, and each card shows
You must specify a value for :slug in the JWT. - Several locked parameters combine with
AND. - An empty array,
[], turns a locked parameter off for that token, so never sign one for the tenant filter. - The key in
paramsis the filter’s slug, and a locked filter only restricts the cards that are connected to it.
Guest viewers don’t sign in to Metabase, so they don’t count as users, and you aren’t billed for them. On the Open Source and Starter plans, guest embeds show a Powered by Metabase banner, which Pro and Enterprise remove.
Metabase SSO embeds: row and column security and tenants
SSO embeds are part of the Pro and Enterprise plans. Your app signs each viewer in to Metabase with JWT or SAML, and with JWT, Metabase creates the account at the first sign-in. Each extra claim in the JWT becomes a user attribute, which Metabase syncs on every login. Row and column security then filters a table for a group by a column that matches an attribute, such as the customer ID. To hide or edit columns as well, Metabase can show the results of a saved SQL question in place of the table.
Tenants group each customer’s users, so one set of dashboards and permissions serves every customer. The @tenant claim in the JWT puts a user in a tenant, and Metabase creates the tenant at the first sign-in when user provisioning is on. Each tenant user gets a @tenant.slug attribute that row and column security can filter on, and each tenant gets its own collection for the questions its users save.
Row and column security applies to questions built in the query builder. When customers also need the SQL editor, use impersonation: Metabase connects with the database role named in each person’s user attribute, and your database enforces that role’s rules. Impersonation works on databases such as PostgreSQL, Redshift and Snowflake. When each customer has its own database with the same schema, database routing sends each person’s queries to their own database. Impersonation and database routing are part of Pro and Enterprise too. For sensitive data, Metabase’s data isolation guide recommends these permission and database methods over locked parameters.
Can customers explore data and build their own charts?
Superset’s embedded SDK embeds dashboards, and the only resource type that a guest token accepts is dashboard. Superset also refuses a chart query from a guest that asks for a different chart, or for metrics or columns that the saved chart doesn’t use, with the message “Guest user cannot modify chart payload”. Its access checks still allow the dashboard’s native filters, and drill to detail or drill by on the dashboard’s own datasets. With PUBLIC_ROLE_LIKE = "Public", the default Public guest role gets the read-only permissions that Superset’s security page lists. They cover viewing dashboards and charts and using dashboard filters, and they leave out write permissions on dashboards, charts and datasets and SQL Lab access.
Metabase guest embeds are view-only as well: they show the dashboards and charts you publish, with the filters you make editable. SSO embeds add drill-through, the query builder, the SQL editor, AI chat and a collection browser, as web components or as React components. Row and column security filters the questions that customers build in the query builder, and tenants give each customer a collection to save them in.
What does your server code do in each tool?
Superset: request a guest token from Superset’s API
Superset’s embedding page says that fetchGuestToken must return a guest token that your server gets from /api/v1/security/guest_token/ with a service account, and never from client-side code. On your server, that takes three requests:
POST /api/v1/security/loginwith the service account’s credentials, which returns a JWT access token. The account needs thecan_grant_guest_tokenpermission.GET /api/v1/security/csrf_token/, because Superset turns on CSRF protection by default and its REST APIs aren’t exempt from it.POST /api/v1/security/guest_token/with the request body shown above. Send the access token in anAuthorization: Bearerheader, the CSRF token in anX-CSRFTokenheader, the session cookie that step 2 set and aRefererheader with your Superset address. Your server sends thetokenfield of the response to the browser.
In the browser, embedDashboard() takes the embedded dashboard ID, your Superset domain, a mount point and your fetchGuestToken function, and then inserts the iframe. The README also describes a second path: your app can sign the guest token itself with GUEST_TOKEN_JWT_SECRET, as long as the token’s aud claim matches GUEST_TOKEN_JWT_AUDIENCE in Superset’s config. In a token that your app signs, the rules go in an rls_rules claim, not rls, and the token also needs "type": "guest", as in the README’s second example.
Metabase guest embeds: sign the JWT on your server
Your server doesn’t call Metabase to get a guest token. It signs the JWT with the embedding secret key, and Metabase verifies the signature when the embed loads. This Express server follows the guest embeds and embedding parameters pages. Before you start it, turn on embedding in Embedding hub > Security, and publish dashboard 10 as a guest embed with its customer_id filter set to Locked. Then copy the key under Secret key for guest embeds on the same page.
// server.js: npm install express jsonwebtoken
// Follows "Guest embeds" and "Embedding parameters" in the Metabase docs.
// In Metabase, publish dashboard 10 as a guest embed with its customer_id filter set to Locked.
const express = require("express");
const jwt = require("jsonwebtoken");
const METABASE_URL = process.env.METABASE_URL; // for example https://metabase.example.com
const METABASE_SECRET_KEY = process.env.METABASE_SECRET_KEY; // your embedding secret key
// Replace this with your app's own session lookup.
function currentCustomerId(req) {
return "42";
}
const app = express();
app.get("/analytics", (req, res) => {
const token = jwt.sign(
{
resource: { dashboard: 10 },
params: { customer_id: [currentCustomerId(req)] }, // locked parameter
exp: Math.round(Date.now() / 1000) + 10 * 60, // 10 minute expiration
},
METABASE_SECRET_KEY
);
res.send(`<!doctype html>
<html>
<body>
<script defer src="${METABASE_URL}/app/embed.js"></script>
<script>
window.metabaseConfig = { isGuest: true, instanceUrl: "${METABASE_URL}" };
</script>
<metabase-dashboard token="${token}" with-title="true"></metabase-dashboard>
</body>
</html>`);
});
app.listen(4000);
The token expires after 10 minutes, so the server signs a fresh one for each page load. To keep an open page working after that, set guestEmbedProviderUri in window.metabaseConfig to an endpoint in your app. When the token has expired, the embed posts to that endpoint for a fresh JWT the next time it needs data, and the endpoint answers with { "jwt": "..." }. Check the viewer’s session and the requested item there before you sign, because the browser picks the entityType and entityId. The value in params must match your filter’s values exactly. To see the format that Metabase expects, pick a value under Previewing locked parameters in the embed wizard and read the server code it generates.
Metabase SSO embeds: return a signed JWT for the signed-in user
For SSO embeds, turn on Modular embedding in Embedding hub > Security, and add your app’s URL under Cross-Origin Resource Sharing (CORS). Turn on tenants in Embedding hub > Tenancy before your customers first sign in, because Metabase treats every existing user as an internal user. Then, in Embedding hub > Authentication, enter your endpoint as the JWT Identity Provider URI, click Set up key, copy the key and save the settings. Metabase’s authentication page says that the endpoint must return a JSON object with a jwt property. This Express route follows that page and the tenants page:
// sso.js: npm install express jsonwebtoken
// Follows the embedding "authentication" and "Tenants" pages in the Metabase docs.
const express = require("express");
const jwt = require("jsonwebtoken");
const METABASE_JWT_SHARED_SECRET = process.env.METABASE_JWT_SHARED_SECRET; // the key from Embedding hub > Authentication
// Replace this with your app's own session lookup.
function currentUser(req) {
return { email: "rene@example.com", firstName: "Rene", lastName: "Descartes", customerId: "42" };
}
const app = express();
// Enter this endpoint's URL as the JWT Identity Provider URI in Metabase.
app.get("/sso/metabase", (req, res) => {
const user = currentUser(req);
const token = jwt.sign(
{
email: user.email,
first_name: user.firstName,
last_name: user.lastName,
"@tenant": user.customerId, // the tenant slug, also the @tenant.slug attribute
exp: Math.round(Date.now() / 1000) + 10 * 60, // 10 minute expiration
},
METABASE_JWT_SHARED_SECRET
);
res.json({ jwt: token });
});
app.listen(4001);
In Embedding hub > Permissions, give the All tenant users group row and column security on each table that holds customer data, filtered by the @tenant.slug attribute. Then set Create queries to Query builder only for that group, so customers can drill through charts and build their own questions. On the page, leave out isGuest and give the component the dashboard’s ID in place of a token, as in <metabase-dashboard dashboard-id="10"></metabase-dashboard>. The modular embedding SDK for React, @metabase/embedding-sdk-react, calls the same endpoint. Install the SDK with the dist tag that matches your Metabase version, such as @65-stable on Metabase 65.
What does each tool cost for many viewers?
Superset is free software under the Apache License 2.0, with no license fee for any number of viewers. What you pay for is the infrastructure: the Superset application, a metadata database, and the cache and workers that some features need.
Preset, the hosted Superset service, sells embedding as an add-on to its Professional and Enterprise plans. Its pricing page, checked on November 12, 2026, says that embedded dashboards require Embedded Dashboard Viewer Licenses, “starting at $500/month for 50 licenses”. Those licenses cover people who view the dashboards in your app without a Preset account. Professional costs $20 per user per month billed annually, or $25 billed monthly, and Enterprise is priced by quote, with volume discounts on viewer licenses.
Metabase prices by plan and by signed-in user. Its pricing page says it plainly: “Guest embeds don’t need a sign-in, so their viewers don’t count as users.” Here are the plans, checked on November 12, 2026:
- Open Source is free to self-host, with unlimited users and guest embeds that show the Powered by Metabase badge.
- Starter costs $100 a month on Metabase Cloud with 5 users included, then $6 per extra user per month, with the same guest embeds.
- Pro costs $575 a month with 10 users included, then $12 per extra user per month, on Metabase Cloud or self-hosted. It adds SSO embeds, the modular embedding SDK for React, row and column security, tenants and guest embeds without the badge.
- Enterprise starts at $20,000 a year, with the same features as Pro and custom pricing.
Showing a guest embed to more customers doesn’t change your Metabase bill on any plan. With SSO embeds, every customer user who signs in counts as a user. For that case, the pricing page offers Enterprise “tailored embedding packages for companies scaling to a lot of end customers, where per-seat pricing doesn’t fit”.
How do self-hosting and upgrades compare?
A Superset installation has four parts: the application, a metadata database, a caching layer, and a worker with beat. The last two are optional, but alerts and reports, caching, async queries and dashboard thumbnails need them. Superset’s docs call Kubernetes, most often with the community-maintained Helm chart, the best-practice way to deploy a production instance. They don’t support or recommend their Docker Compose files for production.
To upgrade Superset, you install the new version and migrate the metadata database with superset db upgrade and superset init. The superset init command also resets the permissions of Superset’s built-in roles, so the security page suggests your own roles, or a copy of a role under a new name, for custom permissions.
Metabase ships as one Docker image or one JAR file. For a first look, docker run -d -p 3000:3000 --name metabase metabase/metabase starts the open-source edition on port 3000. For production, the docs recommend PostgreSQL as the application database instead of the built-in H2 database.
To upgrade a self-hosted Metabase, back up the application database, stop the container and start the new image, ideally with a specific version tag. Metabase performs the upgrade automatically on startup. Long-Term Support releases, such as Metabase 64, get bug fixes and security updates for 14 months, for teams that upgrade less often.
Metabase Cloud hosts Metabase for you on the Starter, Pro and Enterprise plans. Metabase manages the server, uptime and backups, and it upgrades your instance with each new release. Instances that use the modular embedding SDK stay on their version until you request an upgrade, so you can test the changes first.
What AI features does each tool offer?
Superset 6.1 supports AI assistants through a built-in MCP server, which is a separate process that you start with superset mcp run. It ships with Superset 6.1, needs the fastmcp package, and your admin enables and deploys it. Through it, clients such as Claude and ChatGPT can list dashboards, query datasets, execute SQL and create charts, within the roles of the person who connects. Preset’s pricing page lists an AI Chatbot, with your own OpenRouter API key, and MCP server integration on its Enterprise plan.
Metabot, the AI assistant in Metabase, is available on every plan, including the free open-source edition. Connecting your own AI provider doesn’t require a paid plan. Metabot creates charts from plain-language questions with the query builder, generates SQL, fixes query errors and analyzes charts. When it creates a question, you can step into the editor to read or change the query behind it, so you can check how each answer was built. Metabase’s MCP server is also on every plan, and each AI client connects with the permissions of the person who signs in.
For your customers, the embedded AI chat on Pro and Enterprise builds a question in the query builder from the metrics, models and saved questions in a collection that you choose. It needs an SSO embed, so customers can only reach the data that their permissions allow. Pro and Enterprise also let you set hard limits on AI token use for each tenant.
When is Superset the natural fit?
Superset is the natural fit when your team already uses it for internal BI and wants to show the same dashboards to customers. It suits developers who are comfortable running a Python service on Kubernetes, with a metadata database, a cache and workers, and teams that pay Preset to host it instead. It also suits teams that want each tenant’s rule written as a SQL clause in the guest token, where one rule without a dataset ID covers every dataset on the dashboard. Self-hosted Superset has no license fee for any number of viewers. Its docs list support for nearly any SQL database and a wide array of visualizations, and the whole project is under the Apache License 2.0.
Metabase fits when you want the tenant rule in one JWT that your server signs, with no service account, CSRF token or guest role to set up. A guest embed with a locked parameter works on the open-source edition. Guest embed viewers are unauthenticated, and therefore don’t count as billed users on any plan, while Preset sells embedded dashboard viewer licenses starting at $500 a month for 50 viewers. It also fits when customers should explore data and build their own reports in your app. SSO embeds give them drill-through, the query builder and AI chat, filtered by row and column security and grouped by tenant.
Next steps
- Create guest embeds
- Lock parameters on guest embeds
- Set up SSO for modular embeds with JWT or SAML
- Group each customer’s users with tenants
- Set up row and column security
- Choose a data isolation method
- Start with the modular embedding SDK for React
- Embed an AI chat
- Read the multi-tenant embedded analytics guide, with Next.js, Django and Rails code
- Read “Is Metabase embedding free?”
- Compare Metabase and Looker for embedded analytics
- Compare Metabase and Superset for your team’s BI
- Compare Metabase plans