How JWT SSO for Metabase embedded analytics works and when to use it
If your SaaS product or internal portal wants users to reach embedded Metabase without a second login, JWT SSO is the flow where your application signs people in with a signed token sent to /auth/sso. Metabase trusts the token, creates or matches the user, and opens the dashboard the person asked for. The user never sees a Metabase login screen, and your application remains the place where identity is decided.
The flow works in three steps. When an unauthenticated person opens an embedded page, Metabase redirects them to your identity app. That app authenticates the person under your own session rules and returns a signed token to /auth/sso. Metabase verifies the signature, logs the person in and redirects them back to the original page. Because the trust relationship sits between Metabase and your signing key, the key and the token's claims (who the user is, which groups and attributes apply) are the controls you design and test. JWT authentication is available only on Pro and Enterprise plans, so budget for that tier before you design around it.
JWT SSO differs from guest embeds, which need no accounts and use a signed token that grants access to a locked, pre-defined view. Guest embeds work on every plan including open source, but each viewer is anonymous. JWT SSO creates a real Metabase user for each person, so it fits when people need their own identity, group permissions or saved work. SAML and OIDC are the other SSO options, and they also require Pro or Enterprise. Choose JWT when your application already holds the session and can issue a short-lived token, and choose SAML or OIDC when the identity provider should be the central sign-in for Metabase itself. Confirm with your identity team which fits your existing setup before writing code.
Request flow from unauthenticated visit to logged-in embed
The flow starts when a user opens a page containing an embedded Metabase component without a Metabase session. Metabase redirects the browser to the identity app, which the customer's application controls. The identity app returns a token signed with the shared key to Metabase's /auth/sso endpoint. Metabase verifies the signature, creates or updates the user, logs the person in, and redirects them back to the original page. The trust boundary sits where the signing key in the application must match the verification setup in Metabase, so check that the key is stored only on the signing side and that the redirect target is the page the user asked for.
Trust boundary between the application's signing key and Metabase's verification.
Which JWT configuration options fit which setup
This table compares the JWT settings that shape the integration: the identity provider URI, the shared signing key, user attribute and group claims, and whether sign-in starts with GET or POST. Read each row against your app's architecture and your team's tolerance for risk, then confirm the exact parameter names and behavior against the current Metabase JWT documentation for your version.
| Configuration choice | When it fits | Trade-off in flexibility or risk | What to confirm before building |
|---|---|---|---|
| JWT identity provider URI | Your app issues the token from a single known sign-in endpoint that Metabase can send people to | Simple to reason about, but every login path must reach the same endpoint or sessions break | The exact URI value and whether your app redirects through it on every entry point |
| Shared signing key | Your app and Metabase are both under your control and you can store one secret in a secrets manager | Fast to set up, but anyone holding the key can mint tokens for any user, so rotation planning matters | Who can read the key, where it is stored, and how a rotation would be coordinated across both sides |
| Name and email claims | Small internal user bases where identity is one person per account | Low data exposure, but users are matched on email, so a changed or reused address can map to the wrong account | How Metabase matches an incoming token to an existing user and what happens on a changed email |
| Tenant or custom attribute claims | Multi-tenant products where each customer's users should see only their own data | Powerful for data isolation, but a mistake in the claim value can expose another tenant's data | How attribute values feed row-level or tenant permissions on your plan and which claim names Metabase reads |
| Group claims mapped to Metabase groups | Organizations that already manage access in an identity provider and want group membership to follow it | Less manual admin work, but group membership is only as accurate as the identity provider's records | Whether group sync is available on your plan and how unmatched groups are handled |
| GET sign-in initiation | Simple redirect flows where the token is short-lived and the request carries no sensitive payload | Token values can appear in URLs, browser history and server logs, which raises exposure risk | Whether your logs and proxies record query strings and how token lifetime is set |
| POST sign-in initiation | Flows where the token or user data should stay out of URLs and logs | More moving parts in the browser flow, and cross-site handling needs testing | Whether the Metabase version and your reverse proxy accept the POST flow as documented for your setup |
| Secret handling | Any setup, because the key controls who can sign in as whom | Storage in environment variables or a secrets manager is easier to audit than values in config files or source control | Where the secret is stored, who can read it, and whether rotation has been tested in a non-production instance |
Passing user attributes and groups in the token
The token is the only channel through which your application tells Metabase who a person is and what they may see. Each claim you include becomes an input to login, group membership and data scoping, so the cards below cover identity, attributes, groups and the controls that keep them accurate.
Identifying the user
Metabase needs a stable identifier and an email address in the token to match a person to an account and to create one on first login. Use the same identifier your application treats as the user's primary key, not a display name that can change. Confirm with your own test accounts that a renamed user still maps to the same Metabase account, and decide in advance how you will handle an email address that changes at the identity provider.
JWT docsAttributes for data scoping
User attributes such as a region, business unit or customer ID can feed row-level filters that limit which records a person sees. Because these values decide what data is returned, they must come from your system of record at login time. Ask your team to list every attribute used in a filter, confirm each one has a single authoritative source, and test that a user with a changed attribute sees the new scope after the next sign-in.
Groups mapped to Metabase groups
Groups in the token can be mapped to Metabase groups, which then grant collection, data and query permissions. A group name that is not on the mapping list grants nothing, so a typo fails closed, but an overly broad group name in the token grants the matching access. Document each token group, the Metabase group it maps to and the permission that group carries, and review that list with the owner of the authorization model.
Keeping groups in sync
Metabase applies group membership at sign-in, so a person removed from a group in your application keeps the Metabase access until their next login, and an existing session can outlast that change. Decide whether group sync should remove memberships that are absent from the token or only add them, and test both removal and reassignment. Confirm with the vendor how long an active session persists after a change in your environment.
Trusting only verified claims
Metabase trusts whatever claims arrive in a token that it can verify against the shared secret, so the signing step in your application is the real control. If the app copies attributes from request parameters, a user can change their own region or group and gain access to other data. Only sign claims read from the authenticated session or a database lookup, and test by altering a claim in a captured token to confirm it is rejected.
Shared secret handling
The signing secret protects every claim, so anyone who obtains it can mint tokens for any user and group. Store it in a secrets manager or the environment of the application server, never in the front end bundle or a repository, and set a rotation procedure that updates the app and Metabase together. Ask your security team who can read the secret and where access to it is logged.
Setting up JWT SSO on a self-hosted Metabase
This sequence takes a self-hosted Metabase from a confirmed plan to a tested JWT login, where your app signs users in and returns them to the page they started on. Each step ends with a check so the team knows whether to move on.
Confirm the Pro or Enterprise plan
Before any configuration, the platform owner confirms that the Metabase instance runs a Pro or Enterprise plan, because JWT authentication is available only on those plans. Check the license state in the Metabase admin settings and compare it with the plan you bought. If the instance is on Open Source or Starter, stop here and resolve licensing first, since the JWT settings will not be available to configure. Done when the admin console shows the paid plan and the JWT option appears in the authentication settings.
Set up the identity app to issue tokens
Your identity team or the application team configures the identity app that signs people in so that it issues a signed token after a successful login. The token must be sent to Metabase's /auth/sso endpoint and carry the user's email address and any attributes or groups Metabase will read. Agree on the signing algorithm, the claim names and the expiry with the team that owns the identity app. Done when a test token decodes to the expected claims and the signature checks out with the chosen key.
Configure the JWT identity provider URI and signing key
In the Metabase admin settings for authentication, enter the JWT identity provider URI that Metabase redirects unauthenticated people to, and paste the shared signing key or certificate material that Metabase uses to verify tokens. Store the key in your secrets manager and restrict who can read the admin page. Confirm the URI is reachable from the Metabase server and the browser. Done when saving the settings succeeds and a logged-out visit to Metabase redirects to the identity app.
Map user attributes and groups
Define which token claims become Metabase user attributes and which claims map to Metabase groups, so permissions follow the people who sign in rather than manual setup. Agree the mapping with the team that owns data access, and check which group names already exist in Metabase. Metabase group and attribute sync is part of the paid tier, so confirm the feature is included in your plan before relying on it. Done when a test user's groups and attributes appear on their Metabase profile after login, matching the agreed mapping.
Test login with a non-production user
Create a test account in the identity app that does not hold production data access, then sign in through the full flow. The identity app should return a signed token to /auth/sso, Metabase should verify it, create or update the user, and log them in. Repeat with a user who should be denied or who has a limited group to confirm the mapping is correct. Record any failure with the token claims and the Metabase log entry. Done when the test user reaches Metabase without a manual password and sees only the data their groups allow.
Verify the redirect back to the original page
Confirm that the login flow returns the person to the page they first requested, not to the Metabase home page. Open a specific dashboard or question while logged out, sign in through the identity app, and check the final URL. Also test logout and a fresh login to confirm sessions end and restart correctly. If the redirect fails, check the return parameter handling in your app and the identity app's redirect rules. Done when the original page loads after sign-in in each test case.
Document the configuration and rollback path
The team owning the instance writes down the identity app settings, claim names, group mapping, the key storage location and the people who can change them. Record the steps to disable JWT and return to the previous login method, and keep that rollback tested in a non-production instance. Ask your Metabase partner or internal team to confirm the settings match the documentation before production cutover. Done when the document is reviewed, the rollback has been rehearsed once, and the signing key rotation owner is named.
GET versus POST: choosing the request method and what it exposes
The request method you use to deliver the signed token to /auth/sso decides where that token sits on the wire and which records can capture it. With a GET request, the token travels in the URL query string. URLs end up in browser history, in the address bar, in any reverse proxy, load balancer, CDN or web server access log between the browser and Metabase, and in APM traces that record full request URLs. If a page on the return path loads third-party resources, the URL can also reach those hosts through the Referer header. A token lives for a short time, but the identity claims inside it (such as email, groups and tenant identifiers) remain readable by anyone who can open those logs. Before you choose GET, check whether each layer in your path logs full query strings by default.
A POST request carries the token in the request body, so it stays out of the URL, browser history and the default access log format at most proxies. That reduces exposure, but it does not remove it. Body logging is often switched on for debugging, WAFs may inspect and store request bodies, and the identity app must submit the token through an auto-posting form or similar mechanism. That adds moving parts, including cross-site form behavior, browser handling of the redirect and how session cookies are set on the response. Confirm in the Metabase JWT documentation whether your Metabase version accepts POST on /auth/sso, the parameter name and the expected content type. Do not assume that both methods are supported on every version or plan.
Make the choice by testing, not by reading alone. Send a test token with a clearly marked dummy identity through a staging copy of your full path, then search every log, trace and monitoring store for it. Record the method, the Metabase version tested and the proxy and WAF settings that were in force, because upgrades and infrastructure changes can alter logging behavior. Pair the method with a short token lifetime, and use single-use tokens if your identity app supports them. Document the decision in your embedding design so that the team operating the platform knows which logs must be restricted and why.
Secret handling and security controls for JWT SSO
JWT SSO trusts whoever can sign a token, so the shared secret and the checks on each token decide whether embedded analytics stays closed to outsiders. The cards below cover how to create, store, rotate and watch that secret, and which token checks and logging rules keep a single leak from becoming a silent access path into Metabase.
Generating the signing secret
Generate the shared signing key with a cryptographically secure random generator, not a passphrase or a value copied from a document. The key should be long enough that guessing is impractical, and each environment (development, staging, production) should have its own key. Confirm the algorithm and minimum key length that your Metabase version expects in the JWT documentation before you create the value, because a key that works in staging but is generated differently in production causes confusing failures at cutover.
Metabase JWT docsKeeping the secret out of source control
Store the secret in your secrets manager or the platform's environment secret store, and inject it into the Metabase and identity app runtimes at deploy time. Never commit it to a repository, place it in a container image layer, or paste it into a ticket or chat. Scan repositories and build logs for the key pattern as part of your pipeline, and check that old branches and CI variables do not still hold a copy of the value.
Planning rotation without a login outage
Plan rotation as a two-step change: deploy the new secret where both sides can accept it, switch the identity app to sign with the new value, then remove the old one once sessions issued under it have expired. Ask your engineers to confirm whether your Metabase version accepts more than one key during a transition, since a single-key swap forces a brief outage for every user. Record the rotation schedule and owner so the change happens on a known date rather than after an incident.
Restricting who can read the secret
Limit read access to the secret to the few services and administrators that must use it, and grant it through role-based controls in your secrets manager rather than shared accounts. Audit who has viewed or changed the value, and remove access when people change roles. The Metabase admin settings and the identity app's configuration screens may both display the key to administrators, so confirm who holds those admin rights and treat them as holders of the secret.
Responding to a leaked secret
Anyone who holds the signing secret can mint a token for any email address, group or attribute that Metabase will accept, and log in as that person without the identity provider ever seeing the request. If the secret leaks, rotate it immediately, invalidate active Metabase sessions where your version allows, review access logs for logins with unfamiliar claims, and check which accounts the forged tokens could have reached. Write this runbook before go-live and rehearse it with the team that owns the identity app.
Checking expiry, issuer and audience
Set a short lifetime on each token so a captured token stops working quickly, and make Metabase reject tokens that are expired, that name a different issuer, or that are not addressed to this Metabase instance. Test each check with a deliberately bad token: an expired one, one signed by a different key, and one with a changed audience. The exact claim names and validation options depend on your Metabase and identity app versions, so confirm them against the JWT documentation before you rely on them.
HTTPS and logging without token leaks
Serve the login endpoint and the redirect flow only over HTTPS, and ensure the token travels in a way that does not expose it in browser history, proxy logs or referrer headers. Configure reverse proxies and load balancers to omit the token from access logs, and keep application debug logging from printing request bodies or headers during SSO. A token written to a log is valid until it expires, so treat log retention and log access as part of the secret's protection.
Questions buyers ask about JWT SSO for embedded Metabase
Does JWT SSO work on the open source edition of Metabase?
No. JWT authentication is available only on the Pro and Enterprise plans, so an open source instance cannot use the /auth/sso flow for embedded users. Guest embeds work on open source because they do not require SSO, but they do not pass per-user identity, groups or attributes the way JWT SSO does. If your product needs signed-in users with their own permissions, plan for a paid plan before you design the integration. Confirm current plan terms on the Metabase pricing page before you commit.
What does JWT SSO for embedded Metabase cost?
There are two separate costs. The Metabase plan is a subscription: the Metabase pricing page lists Pro at $575 per month, or $517.50 per month billed yearly, with the first 10 users included. The implementation is a services fee paid to whoever builds the integration, and it is usually one-time, while the subscription recurs. The services fee depends on your identity app readiness, how many user attributes and groups you must map, and how much testing your security team requires. Ask any partner for a quote built from a written scope that lists those items.
How long does JWT SSO implementation take?
Duration depends on scope, so it must be confirmed in a written quote rather than assumed. The main variables are whether your identity app can already issue signed tokens with the claims Metabase needs, how many attributes and groups must flow through, whether you use GET or POST requests, and how many environments need testing before production. A narrow scope with a ready identity app is shorter than a broad scope that also changes your login pages or group model. Ask for the timeline to be broken into design, build, test and cutover steps.
What do we need to provide before the work starts?
Three things gate the work. First, an identity app, such as one you already run, that can authenticate your users and sign a token for Metabase. Second, ownership of the signing key and the shared secret, stored in a secrets manager you control, with a named person responsible for rotation. Third, user and group data: the list of attributes, such as tenant or region, and the group names that decide what each person sees. Without these, the team cannot test the flow realistically. Agree on who provides each item in the written scope.
Can our own team implement JWT SSO without a partner?
Yes, if your team has an engineer who can configure your identity app to sign tokens, a developer who can write the signing step in your application, and an operator who can manage the Metabase settings and secrets. The harder parts are usually not the redirect itself but the claim design, group mapping and secret handling, which affect who can see which data. Teams that build it in-house often under-test the cases where a user's groups change or a token expires. A partner is worth considering when those skills or review time are missing from your team.
How does the JWT SSO sign-in flow work?
When a person opens an embedded page without a session, Metabase redirects them to your identity app. That app authenticates them and returns a signed token to /auth/sso. Metabase verifies the signature, logs the person in and redirects them to the original page. Your engineers need to confirm the token claims, the expected signing method and the return path in their own environment, because a mismatch fails silently for end users. Test expired tokens, missing claims and users removed from a group as part of verification.
What security controls matter most for JWT SSO?
The most important control is protecting the signing secret, because anyone who holds it can mint a token for any user, group or attribute. Keep the secret in a secrets manager, limit who can read it, rotate it on a schedule you define, and never place it in client-side code. Review whether tokens travel through GET or POST requests, since URL-based values can appear in logs and browser history. Ask your security team to sign off on claim design, session lifetime and the audit trail before production.
Limits to confirm in your environment before you build
Before you write any code, confirm the exact token contract with the Metabase version you plan to run. Check which claims Metabase reads from the token, how it matches the email claim to an existing account, what it does with first_name, last_name and group claims, and whether the behavior differs between the version you test and the version you ship. Ask Metabase support or check the JWT documentation for the version pinned in your environment, and write the claim names into your design so the identity app and Metabase agree on them. Treat any difference between a documented example and your own test results as a blocker until it is explained.
Confirm the plan before you commit to the design. JWT authentication is available only on Pro and Enterprise plans, so an instance on Open Source or Starter cannot use this flow at all. Check the current pricing page for user counts and per-user costs, and confirm with Metabase whether the embedding use case you have in mind counts as a standard user or needs a separate license. Also confirm which upgrade path your planned version supports, because the release you choose sets the support window you will have to plan around.
Decide how JWT login interacts with every other way accounts and groups reach the same instance. If SCIM, LDAP group sync, or manual administration also manage users or groups, a JWT login can conflict with those sources over group membership or account attributes. Write down which system is authoritative for each group, and test a user who appears in two sources. Confirm the session lifetime setting in your Metabase version and in your identity app, since a short identity session with a long Metabase session, or the reverse, changes who can see embedded content after a role change. Test logout and revocation end to end before launch.
How DeployOpen scopes and delivers JWT SSO for embedded Metabase
DeployOpen plans, builds, tests and documents JWT SSO for embedded Metabase inside your own infrastructure, so your identity app, your application and your Metabase instance stay under your control. Work starts from a written scope that names the plan, the identity flow, the user attributes and groups to pass, and the evidence your security team will review.
How we scope
- Confirm the Metabase plan first, since JWT authentication requires Pro or Enterprise.
- Map which claims your identity app issues, including email, name, tenant attributes and groups.
- Agree in writing whether the flow uses GET or POST, and how the signing secret is stored and rotated.
- Engagements are fixed-scope, with deliverables and timelines agreed before work begins.
How we build
- Configure the JWT identity provider in Metabase and connect it to your identity app.
- Build the redirect path so unauthenticated users reach /auth/sso and return to the original page.
- Map passed attributes and groups to Metabase groups and permissions, then test each group.
- Move signing secrets into your secret store and confirm they never appear in logs or URLs.
How we hand over
- Deliver a test record covering login, logout, expired tokens, bad signatures and group changes.
- Document the token contract, claim names, secret rotation steps and the request method chosen.
- Walk your platform and security teams through the configuration and the reasons behind each choice.
- Provide runbook steps for adding a claim, rotating the secret and troubleshooting a failed sign-in.
How we support
- Ongoing support, Metabase upgrades and continuous security testing are available as retainers.
- Retesting the SSO flow after each Metabase upgrade, since release changes can affect sign-in behavior.
- Reviewing claim changes and new user groups before they reach production.
- Ask any provider to confirm retainer coverage and response expectations in the written quote.

