Multi-tenant embedded analytics with Metabase tenants

Metabase tenants let a B2B SaaS product give each customer its own isolated users, groups and data views on one self-hosted instance. This page covers the design choices, setup sequence, plan requirements and limits to confirm before you build.

On this page

Multi-tenant embedded analytics with Metabase tenants: when your product needs it

A B2B SaaS team needs Metabase tenants when one application serves many customers from a single Metabase instance and each customer must see only its own rows. Metabase's tenant model separates tenant users from internal users: according to the Metabase tenants documentation, tenant users cannot join internal groups and internal users cannot join tenant groups. Each customer is identified by a tenant slug, and tenant groups, shared collections and data permissions work together so that dashboards and questions can be shared across tenants while every tenant still sees only its own data. If your product only needs an end user to view a few fixed dashboards, a guest embed may be simpler. If customers need their own logins, their own admins or strict separation of configuration, the tenant model becomes the question to answer first.

The alternative designs are a separate Metabase instance per customer or a single shared instance without tenants. A per-customer instance gives the strongest boundary but multiplies upgrades, backups, SSO configuration and monitoring across every customer, so the operating cost grows with the customer count. A shared instance without tenant isolation relies on hand-built permissions that are easy to get wrong at scale. Confirm with your own architecture team how many tenants you expect, how often customers will add or remove users, and whether any customer requires its own database or network boundary, since tenants do not replace those decisions.

Tenants are not available on every plan. Per Metabase's pricing page, multi-tenant data segregation is included only in the Pro and Enterprise plans, and JWT-based provisioning of tenants also requires Pro or Enterprise per the people and groups documentation. Before you design around tenants, check the current Metabase pricing page against the features you need, and ask Metabase or your partner to confirm how tenant provisioning from your identity claims, including the @tenant claim, fits your authentication flow.

How tenant users, internal users and shared collections differ

Internal users are your own staff: the platform engineers, support agents, analysts and administrators who run the Metabase instance and the business behind it. They sit in internal groups, which typically carry administrative rights and broad access to the connected databases. Because they are your employees, their access is governed by your normal workforce controls, including identity provider sign-in and access reviews.

  • Administrative scope: Admins manage the instance, databases, settings and the tenant configuration itself.
  • Internal groups: Permissions for analysts and support staff are granted through groups that tenant users can never join.
  • Separate sign-in path: Internal users typically authenticate through your workforce identity provider, which requires a paid plan for SAML, OIDC or JWT based setups.
  • Broad data reach: Internal groups may see rows across all tenants, so membership should be reviewed on a schedule.
  • Support access: Staff who troubleshoot tenant issues should use named accounts so their activity appears in audit records.

Confirm with your team which internal roles genuinely need cross-tenant visibility, and document who can change tenant group membership.

Tenant configuration options and when each fits

This table compares the main configuration choices for Metabase tenants: where the tenant slug comes from, how access is granted, how shared content is organized, and how tenants are created. Read each row against your own tenant count, identity setup and change rate, then confirm the requirements with your Metabase edition and your identity provider before committing.

OptionWhen it fitsWhat it requiresWhat to confirm
Tenant slug from the @tenant claimYour identity provider or app can put one tenant identifier in every token, and each user belongs to one tenantA JWT setup that carries the @tenant claim on every sign-in requestThat the claim is always present, cannot be edited by users, and matches your tenant record format
Tenant slug from another selected attributeYour tenant identifier already lives in a user attribute, such as an organization code, and you do not want to rename it in tokensSelecting the attribute as the tenant source when configuring JWT, with values kept consistentWhich attribute is selected, whether it is unique per tenant, and how a value change would affect existing users
Tenant groups for accessEach tenant has its own users and only needs access to its own data and collectionsTenant groups that stay separate from internal groups, since the two populations cannot be mixedThat no internal admin needs to see tenant content through an internal group, and how exceptions are handled
Attribute-driven permissionsAccess differs by user within a tenant, such as by region or role, and must follow data rather than group membershipAttributes passed through JWT and data permissions that filter rows on those attribute valuesThat row-level filtering is set on every table tenants can query, since a missing filter can expose other tenants' rows
Shared collectionsSeveral tenants read the same dashboards and questions, such as product reports or standard templatesA shared collection with data permissions that still limit each tenant to its own rowsThat no shared content embeds tenant-specific data or hard-coded tenant identifiers
Per-tenant collectionsTenants customize their own dashboards or need content that others must never seeOne collection per tenant, with permissions set so only that tenant's users can read or edit itHow many collections you will manage and who maintains templates copied across them
Manual tenant creationYou have a small, stable number of tenants and onboarding is rare and handled by staffAn admin creates tenants, groups and collections by hand in the Metabase admin settingsThe steps an admin must repeat per tenant and how removal of a tenant is recorded
JWT-provisioned tenantsTenants are added often, or the product already creates tenant records and users at sign-upJWT sign-in configured with tenant data passed in each request, on a Pro or Enterprise planWhich plan includes multi-tenant support in your current pricing, and how deprovisioning works when a tenant leaves

How a JWT claim reaches the tenant boundary

The request starts in your application, which signs a JWT carrying the @tenant claim and the user's attributes with a secret that never leaves your servers. Metabase verifies the token at the /auth/sso flow, matches or provisions the tenant user and tenant group, and then applies data permissions so queries return only that tenant's rows. Check that the tenant claim comes from your server-side session, not from a value the browser can change, and that the trust boundary sits where your app hands over the token.

Tenant claim flow from the application, across the trust boundary, into Metabase data permissions.

Setting up tenants for a B2B SaaS product, step by step

This sequence takes a B2B SaaS team from plan and identity decisions through a production-ready Metabase instance, tenant groups, shared collections and row-level permissions, ending with proof that one tenant cannot see another tenant's data.

  1. Confirm the plan and SSO path

    Before any build work, confirm that your plan covers tenants and the identity path you need. Multi-tenant data segregation, row and column permissions and SSO are listed on the Pro and Enterprise plans, not on Open Source or Starter, and JWT-based provisioning requires Pro or Enterprise. Ask your Metabase contact and your identity team to confirm which login method your product will use for tenant users and which method internal staff will use. The step is done when the plan, the JWT or OIDC path and the owner of each identity source are written down in the design record.

  2. Prepare a production application database and version

    Replace the embedded H2 application database with PostgreSQL or MySQL before you create any tenant groups, because tenant users, groups and permissions are stored there and moving them later means a migration. Choose a Metabase version that is supported for the period you plan to run, using the version support page as the reference. Back up the application database and record the Metabase version in your runbook. The step is done when a test login and a restored backup both succeed on the production-grade database.

  3. Define the tenant slug and claim contract

    Agree on the tenant slug format and the source of each value that Metabase receives. The slug identifies each tenant and, with JWT provisioning, comes from the @tenant claim or another attribute you select. Write a contract that lists each claim name, its type, who issues it and what Metabase does with it, including which claims map to groups and which to user attributes. Ask your identity and application teams to confirm that the claim cannot be changed by end users. The step is done when a signed sample token from your app produces the expected tenant slug in a test login.

  4. Create tenant groups and shared collections

    Create one tenant group per tenant and keep tenant users in those groups only. Tenant users cannot join internal groups and internal users cannot join tenant groups, so keep the two populations separate by design. Create shared collections for dashboards and questions that all tenants may see, and place tenant-specific content in collections that only that tenant group can open. The step is done when a listing of groups and collections shows no tenant group with access to another tenant's collection, and no internal group appears in a tenant group.

  5. Set row-level data permissions

    Shared collections do not isolate data by themselves. Configure data permissions so that each tenant group sees only its own rows, using the tenant attribute or the slug as the filter value on the relevant tables. Apply the same rule to every database and table that backs a shared dashboard, because a shared question that reads an unfiltered table will expose rows from all tenants. Record which tables are filtered and which are intentionally open. The step is done when a query run as a tenant user returns only that tenant's rows in each table you have configured.

  6. Test isolation with two tenant accounts and an internal account

    Create two tenant test accounts in different tenant groups and one internal account. Sign in as each account and open every shared dashboard, saved question, collection and search result. Confirm that tenant A cannot see tenant B's rows, collections or names, that neither tenant account can reach internal collections, and that the internal account sees what its role allows but no tenant-scoped data it should not see. Repeat the test after each change to groups, claims or permissions. The step is done when all checks pass in a written test record that names the tester and the Metabase version.

  7. Record the evidence and hand off to operations

    Store the claim contract, group and collection map, permission settings, test record and backup policy together so that your security or compliance reviewer can read them without asking the build team. Schedule the isolation test to run again after every Metabase upgrade and every change to identity or permissions. The step is done when the evidence set is stored in your controlled repository, the upgrade procedure references the isolation test, and the operations owner has confirmed they can rerun it.

Where tenant isolation usually breaks

Tenant isolation in Metabase rarely fails inside the database. It usually fails in the configuration around it, and the most common gap is the tenant claim. When tenants are provisioned with JWT, the tenant slug comes from the @tenant claim or another attribute you select. If your application signs that token from a value a user can edit, such as a profile field or a request parameter, one customer can request another customer's slug. Check that the claim is set server side from your own session or account record, that it is always present, and that requests without a valid tenant are rejected rather than falling back to a default.

Shared collections are the second weak point. Dashboards and questions in shared collections are visible to every tenant by design, so any tenant-specific filter, card title, or saved question that names a customer, or that was built against one tenant's table, becomes a leak. Data permissions are the third. Each database connection needs permissions set so that every tenant sees only its own rows, and a database that was added later, or a new table that was synced without review, can sit outside those rules. Confirm, for every connected database, which tenant boundary applies and test it with a non-admin tenant account.

Administrators and internal users are the last failure point. Internal users and tenant users are kept apart, but an internal administrator or a broad internal group can still open data and collections that tenants depend on, and an overly broad internal account can be used to reproduce what a tenant sees. Decide who holds admin rights, keep that list short, and log their activity. Then run a written test of isolation: sign in as two tenants, attempt each other's dashboards and saved questions, and repeat after every upgrade or permission change.

Security and operational controls for tenant data

Tenant isolation in Metabase depends on several controls working together: how the JWT is signed, how the tenant claim is checked, how row-level data permissions are tested, who holds admin rights, what gets logged and what is backed up before changes. Each card below names one control, why it matters for a multi-tenant embed, and what to verify before go-live.

Sign and protect the JWT secret

Your application signs the JWT that Metabase trusts for tenant sign-in, so the signing secret is the root of tenant identity. Keep it out of source control, store it in a secrets manager you already operate, and rotate it through a planned change with both your app and the Metabase JWT settings updated together. Confirm that only your backend can read the secret and that embedded pages never receive it. Test that a token signed with a wrong key is rejected.

Tenants docs

Validate the tenant claim server side

The tenant slug comes from the @tenant claim or another selected attribute, so anything that sets that value decides which tenant a user lands in. Your backend should set the claim from its own record of the logged-in customer, never from a request parameter or a value the browser supplies. Check that a user who changes the tenant value in a request still sees only their own tenant. Document which attribute your team selected and why.

Verify row-level permissions with test accounts

Shared collections are visible to all tenants, so the data permissions behind them must keep each tenant to its own rows. Create at least two test tenants with known sample rows, sign in as each one, and check every dashboard, question and filter in shared collections. Repeat the check after any change to tables, permissions or dashboards. Record the results so a reviewer can see what was tested and when.

Review internal admin access

Internal users with administrator rights can see data across tenants, and tenant users are kept apart from internal groups, so the admin list is a direct isolation risk. Limit admin rights to a named set of people, remove accounts for staff who have left, and review the list on a fixed schedule. Confirm which internal groups have data access to production tenant tables and whether that access is needed.

Log tenant activity for review

Usage analytics and auditing are available on the Pro and Enterprise plans, and they are the evidence you would show when a customer or assessor asks who viewed which tenant's data. Before launch, confirm which events are captured, how long logs are kept, and who can read them. Open source installs do not include this capability, so teams on those plans need another logging approach at the proxy and database layers.

Metabase pricing

Back up the application database first

Tenant groups, collections, permissions and JWT settings all live in the application database, so a bad change can break isolation as easily as it breaks the app. Take a backup before any upgrade, permission change or tenant schema change, and test that you can restore it. Upgrades run database migrations automatically, and the recommended rollback is restoring the pre-upgrade backup, so the backup must exist before the change starts.

Upgrading docs

Questions teams ask before building tenants

What does a multi-tenant Metabase build cost?

The cost depends mostly on the licence tier you need and the labour to build the tenant model. Tenants and the SSO that provisions them sit behind the Pro and Enterprise plans, so the Metabase pricing page is the first place to check: Pro is listed at $575 per month or $517.50 per month billed yearly with the first 10 users included, and Enterprise is priced by quote starting at $20,000 per year. The one-time cost is the design and build of tenant groups, shared collections, data permissions and the JWT claim contract. The recurring cost is the licence, your own hosting, upgrades and per-user fees, which should be confirmed against your expected tenant user count. Ask any partner for a fixed-scope quote that lists each deliverable.

How long does a tenant build take?

Duration is set by how many tenants and data sources you have, how clean your identity claims are, and how much of the data permission model must be verified. Teams with one warehouse, a stable tenant identifier and a small number of roles usually move faster than teams with several databases, per-tenant row rules and existing user records to reconcile. Your engineers also need time to build the authentication endpoint and test cross-tenant access. Treat any date as something to agree in a written scope, not something to assume from a generic estimate.

What must our team supply before the build starts?

Three inputs gate the work. First, a working SSO path, which for embedded tenants means the JWT signing flow from your application into Metabase. Second, access to the databases, with credentials and a clear map of which rows belong to which tenant. Third, a written tenant claim contract that names the @tenant claim or the attribute used for the tenant slug, the group claims, and what happens when a claim is missing. Your team should also decide who owns the signing secret and the rotation process before any tenant is provisioned.

Can an internal team build multi-tenant Metabase alone?

Yes, if the team has engineers who know the application's identity model, a database administrator who can design row-level data access, and someone who owns the release calendar. The hard parts are not the screens but the isolation rules: tenant users cannot join internal groups and internal users cannot join tenant groups, so mistakes in group design can expose data or lock out customers. Plan for a test tenant pair, scripted checks that each tenant sees only its own rows, and a review of the shared collections before go-live.

When is it worth bringing in a partner?

A partner is worth considering when the tenant model touches several systems at once, when a compliance reviewer will ask for evidence of tenant isolation, or when your internal team has no one who can own the JWT flow and the data permissions after launch. DeployOpen plans, implements, hardens, documents and supports self-hosted Metabase in your own infrastructure, and most engagements are fixed-scope with agreed deliverables. Ask for the written scope before comparing options, and confirm what remains your responsibility after handover.

How do we prove tenants cannot see each other's data?

Start by writing the isolation rule for each table and collection, then test it with at least two tenant accounts that query the same dashboard. Confirm that shared collections contain only dashboards and questions that are safe for every tenant, because data permissions must still filter rows per tenant. Keep the test results and the permission configuration as evidence. Independent auditors decide whether the controls satisfy a framework such as SOC 2, but DeployOpen can prepare the systems, controls and evidence those assessments review.

What breaks most often after tenants go live?

The most common failures are claims that change format, a tenant slug that no longer matches the provisioned record, and a new internal group that accidentally receives access to tenant data. Upgrades can also surprise teams, because Metabase runs application database migrations automatically, so back up the application database and test tenant behaviour on a non-production copy first. Monitor failed sign-ins and review group membership on a fixed schedule so drift is caught early.

What a SOC 2 or ISO 27001 reviewer will ask about tenant design

DeployOpen prepares the systems, controls and evidence that a SOC 2 or ISO/IEC 27001 assessment will look at, but it does not issue reports, attestations or certifications. Those come from an independent auditor for SOC 2 and from an accredited certification body for ISO/IEC 27001. For a multi-tenant Metabase design, the reviewer's first question is usually how tenant isolation is enforced and how you show it works. A SOC 2 examination uses the AICPA 2017 Trust Services Criteria, and the security common criteria CC1 to CC9 apply to every SOC 2 report. The logical access controls in CC6 are where tenant separation is usually tested, so expect questions on who can create tenants, who can join tenant groups and how data permissions limit each tenant to its own rows.

Two report types matter for the design decision. A Type 1 report describes the system and whether controls were suitably designed as of a date, while a Type 2 report adds an opinion on whether those controls operated effectively over a period. For tenant isolation, a Type 1 can show that tenant users are separated from internal users and that shared collections are governed, but a Type 2 needs evidence over time, such as permission reviews, tenant provisioning logs and change records for JWT claim mapping. Confirm with your auditor which period and sample sizes they will use. On the ISO/IEC 27001:2022 side, Annex A access control and the related technological controls are the natural home for the same evidence, and the auditor will check that your tenant model is covered by your information security policy and access review process.

Prepare the evidence before the questionnaire arrives. Keep a written tenant model that lists tenant groups, the shared collection contents, the data permissions per tenant and the attributes or @tenant claims that drive provisioning. Export and retain the permission settings at set intervals, and record who approved each change to them. Ask your auditor which of these artifacts they expect as system description material and which they will sample. Your buyer's security team may also ask whether Metabase activity is logged and retained for review, which is covered in the compliance section of this page.

How DeployOpen scopes and delivers tenant work

DeployOpen scopes tenant work as a fixed-scope engagement, with the scope, deliverables and timeline agreed in writing before the build starts. For a multi-tenant Metabase, the written scope should name each component in the design: the tenant slug source (the @tenant claim or another selected attribute), the tenant groups and their separation from internal groups, the shared collections that hold dashboards and questions for every tenant, the data permissions that restrict each tenant to its own rows, and the JWT provisioning flow from your application. It should also state which Metabase plan the design requires, since SSO-based tenant provisioning needs Pro or Enterprise, and which parts run in your cloud account, data center or air-gapped network. Ask for the scope to list the Metabase version and the application database, so the upgrade and backup responsibilities are clear.

The isolation test plan is where the scope becomes verifiable. Before handover, the tests should attempt cross-tenant access from tenant accounts: reading another tenant's dashboards, joining an internal group, querying rows outside the tenant's filter, and exporting data from shared collections. The same tests should confirm that internal users cannot see tenant content they should not reach. Ask for the test cases, the accounts and tenants used, the evidence captured, and a retest after any fix. Your security and compliance team should be able to rerun these tests later, so ask for them to be documented as runnable steps rather than a one-time sign-off. Any retest after a Metabase upgrade should be part of the plan, not an extra.

Handover covers the configuration as documented, the runbook for adding and removing tenants, the operational procedures for backups and upgrades, and the list of open risks with owners. Ongoing support, upgrades and continuous testing are available as retainers, which suit tenant changes and Metabase release cycles that continue after the initial build. A quote follows from the written scope, so the inputs that drive cost are the number of tenants and data sources, the depth of JWT integration with your application, and the number of isolation test cases your team needs. Confirm with DeployOpen which costs are one-time and which recur under a retainer, and confirm your own plan and user counts with Metabase before the quote is final.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.