Metabase OIDC SSO setup

Connecting self-hosted Metabase to an OpenID Connect provider so people sign in with your identity system, provisioned at first login and grouped from your IdP. OIDC requires a Pro or Enterprise plan.

On this page

How Metabase OIDC SSO works and who it applies to

OIDC single sign-on in Metabase is available only on the Pro and Enterprise plans, not on Open Source or Starter. If your self-hosted Metabase must sign people in through an existing OpenID Connect provider, this is the supported method to plan around. On those paid plans, Metabase provisions an account at each user's first login, passes name and email attributes from the provider, and can synchronize group membership from the identity provider (IdP). The Metabase OIDC documentation describes these behaviors, and you should confirm them against the version you intend to run before you commit to a design.

This page covers the client configuration on both sides of the connection: what Metabase needs from the IdP, what the IdP must send back, and how the two are tied together. It covers the encryption key prerequisite, client settings, provisioning, attribute passing and group synchronization. It does not walk through the screens of a particular provider. Provider-specific steps for Keycloak, Okta, Entra ID, Google Workspace and Auth0 sit in their own sibling topics, so use this page to define the shared design and then follow the matching provider guide.

Before you read further, confirm three things: the edition and plan you are licensing, the IdP you will connect (and whether it issues the name, email and group claims Metabase needs), and who on your side owns the redirect URI and client secret on each end. Those decisions determine whether the setup is a one-day configuration task or a cross-team change involving identity, security and the Metabase administrators.

What you need before configuring OIDC in Metabase

OIDC single sign-on in Metabase depends on a plan, a production-grade database, a supported version, a stable HTTPS address and an identity provider you can administer. Confirm each item before you touch the identity provider, because several of them are hard to change once users sign in.

Pro or Enterprise plan

OIDC is available only on the Pro and Enterprise plans. Open Source and Starter can use Google sign-in and LDAP but not OIDC, so confirm the plan your organization has purchased before planning the rest of the work. Ask the vendor or your Metabase account contact which plan covers your instance and how users are counted, since the paid plans charge per user above the included amount. Plan costs recur, and the quote for Enterprise follows from a written scope.

Metabase pricing

Production application database

Metabase stores its own settings, users, groups and saved content in an application database. The embedded H2 database is meant for demos, so plan a PostgreSQL or MySQL instance before configuring SSO. If you are moving from H2 later, the migration must use the same Metabase version that last wrote the H2 file, which is easier to handle before users and group mappings exist. Confirm the supported MySQL and MariaDB versions and the utf8mb4 character set with your database team.

Application database docs

Supported Metabase version

Record the exact Metabase version in use and its support status before you start. Long-term support releases receive support for a longer period than monthly releases, and non-LTS releases reach end of life much sooner. If your version is near end of life, upgrade first so SSO work is not repeated later. Confirm which release line your organization follows and the end-of-life dates on the version support page before you choose a target.

LTS support window
14 months
Version support

Encryption key prerequisite

Metabase stores sensitive values, including credentials for connected databases and identity settings, in encrypted form. Before you enter OIDC settings, confirm that the encryption key is set and that you have a secure, backed-up copy of it, because losing it can make stored values unreadable after a restore. Confirm the current key requirements, the variable name and the rotation guidance in the Metabase docs for your version before you proceed.

Application database docs

Reachable HTTPS site URL

The OIDC redirect address is built from the Metabase site URL, so that URL must be final before you register the client with your identity provider. It should use HTTPS, resolve to the Metabase instance from the browsers that sign in, and match exactly what you enter in the provider. Changing the site URL later means updating the client redirect entries and testing again. Confirm the DNS name, certificate chain and reverse proxy routing with your network team.

OIDC-capable identity provider with admin access

You need an identity provider that supports OpenID Connect and an account with rights to create a client, set redirect URIs, choose which claims are released and manage groups. Confirm who approves client creation and who owns the provider's group data, since group synchronization depends on both. Check that the provider can send the name, email and group claims Metabase needs for your design, and note any provider-side settings, such as user disablement, that will block sign-in.

Configuring the OIDC client and Metabase settings in order

This sequence takes an OIDC connection from prerequisites to a verified first login. Each step ends with a check, so the team can stop and fix a problem before it reaches users. The result is a working OIDC sign-in with a provisioned test account whose name, email and groups match the identity provider.

  1. Confirm plan and application database

    Before changing identity settings, confirm the instance runs a plan that includes OIDC. Metabase's pricing page places OIDC on Pro and Enterprise, so an Open Source or Starter instance cannot complete this sequence. Also confirm the application database. The embedded H2 database is meant for demos, and Metabase recommends PostgreSQL for production. If you are still on H2, migrate first with the documented load-from-h2 command, run with the same Metabase version that last updated the H2 file. Done means the instance reports PostgreSQL or MySQL as its application database and your paid plan is active.

  2. Set the encryption key before first start

    Set the encryption secret key as the environment variable MB_ENCRYPTION_SECRET_KEY before the instance stores any SSO client secret. Generate a long random value, keep it in your secrets manager, and confirm the variable name against the configuration documentation for your version. A changed or lost key can leave stored credentials unreadable, so record it in your backup runbook alongside the application database backup. Done means the instance starts cleanly with the variable set, and you hold a tested copy of the key outside the server.

  3. Register Metabase as an OIDC client

    In your identity provider, create a confidential OIDC client for Metabase. Use the redirect URI given in the Metabase OIDC documentation for your version, and make it match your public Metabase site URL, including scheme and path. Request the scopes the documentation lists, which typically include openid along with the profile and email scopes so that name and email can pass. Record the issuer URL, client ID and client secret in your secrets manager. Done means the client exists, the redirect URI matches character for character, and the secret is stored outside the identity provider console.

  4. Check the discovery document loads

    From the Metabase host or a machine on the same network path, request the issuer's OpenID configuration document. Providers publish it under the issuer URL at the standard well-known path. Confirm it returns valid JSON that lists the authorization endpoint, token endpoint and key set, and that the issuer value matches the one you plan to enter. A trailing slash mismatch or a blocked outbound connection here usually surfaces later as a login error, so catch it now. Done means the document loads over HTTPS from the Metabase host and the issuer string matches exactly.

  5. Enter issuer, client ID and secret

    In the Metabase admin settings, open the authentication area and find the OpenID Connect section. Enter the issuer URL, client ID and client secret from step three exactly as the identity provider shows them. Keep OIDC login switched off until the values are saved. Confirm the secret is stored and shows as a masked value when you return to the page. Done means the settings save without validation errors and the client secret field no longer displays the plain value.

  6. Enable OIDC login with a fallback session

    Turn on OIDC login in the same section, then open a private browser window so an existing administrator session does not hide the result. Keep one administrator session open in another window in case the sign-in redirect fails and you need to change settings. Check that the Metabase sign-in page offers the OIDC option. Done means the option appears on the login page and the administrator can still reach the admin settings from the fallback session.

  7. Test first login with a non-admin account

    Sign in with a test user who is not an administrator and who holds the group membership you expect to map. Follow the redirect to the identity provider, authenticate, and confirm the browser returns to Metabase. If the login fails, read the Metabase logs and the identity provider sign-in log together, since matching timestamps usually show whether the redirect or the token was rejected. Done means the user lands in Metabase without an error page and the session survives a page refresh.

  8. Verify the provisioned account and attributes

    Open the people section in the Metabase admin area and find the new account. Accounts are created at first login on Pro and Enterprise, so no manual creation should be needed. Confirm that the first name, last name and email match the identity provider profile, and that the user holds the groups you designed. If a name, email or group is wrong, correct the attribute claim or group setting in the identity provider, then have the user sign in again. Done means the account record matches the source profile and the group membership matches your access design.

How attributes and groups map from the IdP to Metabase

The first concern is identity: the name and email that the identity provider sends when a person signs in. On Pro and Enterprise plans, Metabase OIDC provisions the account at first login and passes these attributes into the new user record, so they need to be correct before anyone signs in for the first time. Decide which claim carries the email address, confirm it is verified in the identity provider, and check how the name is split into first and last name. Most problems here come from a claim that exists but holds the wrong value, such as a display name where a given name was expected, or a username where an email address was expected.

  • Email as the account key: Confirm which claim holds the address you want as the Metabase login, and whether users can change it in the identity provider.
  • Name fields: Check whether the identity provider sends separate given and family names or a single display name, and what happens for accounts with no surname.
  • Verified email: Ask whether the identity provider only issues verified addresses, since an unverified address should not create or match an account.
  • Existing accounts: Test what happens to a local Metabase user who has the same email address as an incoming OIDC login.
  • Test users: Sign in with at least one account from each user population before rollout and compare the stored name and email with the source record.

Check every attribute with a test account before you enable the integration for everyone.

Claims, Metabase fields and what each controls

This table maps each identity provider claim Metabase reads during OIDC sign-in to the Metabase user field or group membership it fills, and shows what each mapping controls for access. Read it before you configure the identity provider, because a missing or misnamed claim changes either the account name or who gets into which group. Claim names vary by identity provider and configuration, so confirm each one in your own environment with a test login.

Source claimMetabase destinationAccess effect
Email claim (commonly email)User email address and login identityIdentifies the account at first login. A missing or changed email can create a duplicate account or block the sign-in.
Given and family name claims (commonly given_name, family_name)First name and last name on the user profileDisplay only. Does not grant or remove access, but helps admins match people to accounts during reviews.
Group claim (name set by your identity provider)Metabase group membership, applied when group sync is enabledAdds or removes the user from Metabase groups, which controls data and collection permissions. Requires a Pro or Enterprise plan.
Group claim values that match no Metabase groupNo Metabase group changeIgnored for access. Confirm whether unmatched groups are skipped in your Metabase version before relying on them.
Absent group claimMembership left as configured, or removed, depending on sync settingsConfirm the sync behavior when the claim is missing, since this can strip a user's permissions unexpectedly.
Account created at first loginNew Metabase user recordAnyone the identity provider authenticates can get an account, so restrict the application assignment in the identity provider.

Securing the OIDC login path

OIDC moves the sign-in decision to your identity provider, so the security of Metabase now depends on several connected settings: how the client secret is stored, who the IdP lets in, which local accounts can still log in, and how the encryption key is protected. Review each of these together before users are routed to the new login.

Client secret storage and rotation

The OIDC client secret lets Metabase exchange authorization codes with your provider, so treat it like a production credential. Keep it in your secrets manager or an environment variable managed by your platform, not in a config file checked into source control. Confirm with your identity team who can read it, how it is rotated, and what happens to logins while the old and new secrets overlap during a change.

Restricting who can sign in

An OIDC provider can often authenticate any account in its directory, which is broader than the people who should reach analytics data. Limit access at the IdP by assigning the Metabase application only to approved users or groups, and confirm that disabled or departed accounts cannot complete a login. Metabase's own account provisioning should follow this restriction, not replace it.

Deliberate password and fallback accounts

Password login and the original admin account often stay active after SSO goes live, which creates a second way in that bypasses your IdP policies such as multi-factor authentication. Decide in advance whether password login stays enabled, who holds a break-glass admin account, where its credentials are stored, and how its use is logged and reviewed. Document this decision before cutover.

HTTPS and exact redirect URIs

The redirect URI registered with your provider must match the Metabase site URL exactly, including scheme, host, port and path. Serve Metabase only over HTTPS behind your reverse proxy, so tokens and session cookies are not exposed in transit. Mismatched or wildcard redirect URIs are a common reason logins fail, and a permissive setting can let a token be delivered to an unintended location.

Protecting the encryption key

Metabase uses an encryption key to protect sensitive values it stores, including database connection details, so an OIDC rollout does not replace it as a control. Back up the key with the application database, store it under the same controls as other production secrets, and confirm that a restored instance can read the stored values. Losing or changing it without a plan can break connections.

Reviewing admin rights after group sync

Once group synchronization is active, Metabase grants access based on groups the IdP sends, so an IdP group mapped to administrators becomes an admin path. Review which IdP groups map to Metabase admin, confirm that only a named set of people belong to them, and check the mapping after every change to group structure. Run this review on a schedule and record the outcome for access reviews.

Metabase OIDC docs

Common OIDC login failures and how to fix them

This table maps the symptoms people usually see when OIDC sign-in to Metabase breaks to their likely causes and fixes. Start with the Metabase logs and the identity provider's sign-in logs, since they usually name the failing step, then work through the matching row.

SymptomLikely causeFix
Identity provider shows a redirect URI mismatch errorThe callback URL registered in the identity provider does not exactly match the Metabase site URL, including scheme, host, port and pathSet the Metabase site URL under admin settings to the exact public address users type, then register the matching callback URL in the identity provider and compare them character by character
Metabase fails at startup or on the login button with a discovery or issuer errorThe issuer or discovery URL is wrong, unreachable from the Metabase server, or has a trailing slash or path difference from the provider's published valueOpen the provider's well-known configuration URL from the Metabase host, confirm the issuer value matches the configured one exactly, and check DNS and outbound TLS trust for the provider's certificate
Token exchange fails with an invalid client or unauthorized client errorThe client ID or client secret was mistyped, rotated in the identity provider without updating Metabase, or the client is set to a public type that does not use a secretRe-copy the client ID and secret from the identity provider, confirm the client authentication method the provider expects, and save the settings again
User sees an access denied or account disabled message at the identity providerThe user is unassigned from the application, blocked, or does not meet a sign-in policy such as required MFA or a network restrictionCheck the user's assignment and status in the identity provider's sign-in logs, then grant access or correct the policy. Metabase is not the source of this block
Login completes but Metabase reports that the account could not be createdThe identity provider does not send an email or name claim, or the claim names differ from what Metabase is configured to readConfirm the scopes requested include the profile and email scopes, check the claims in a test token, and align the attribute names in Metabase with the claims the provider actually sends
Users sign in but land in the wrong groups or in no groupsThe groups claim is missing from the token, the claim name does not match the mapping, or group names differ in case or format from the Metabase group mappingAdd the groups claim to the ID token or user info response in the provider, match the claim name exactly, and map each identity provider group to the correct Metabase group
Group membership does not update after a user changes teamsGroup synchronization runs only at login, so existing sessions keep old memberships until the user signs in againAsk the user to sign out and back in, then confirm the new group appears in the claim. Document this behavior for your access review process
Browser loops between Metabase and the identity provider after a successful sign-inA reverse proxy or load balancer terminates TLS but Metabase sees http, so the cookie or redirect scheme does not match the public addressSet the public site URL to https, pass forwarded protocol and host headers from the proxy, and confirm the Metabase cookie settings match the public domain
Sign-in fails only for some users or only from some networksSession cookies are blocked by a browser setting or proxy rule, or a network path to the identity provider is restricted for certain segmentsTest with a clean browser profile, review proxy logs for dropped cookies or redirects, and confirm that every user network can reach the provider's endpoints

How a first OIDC login flows between the user, Metabase and the IdP

The flow starts when a user opens Metabase and chooses single sign-on, which redirects the browser to the identity provider. After the user authenticates, the provider returns an authorization code to Metabase, and Metabase validates the tokens before any session is created. On first login, Metabase provisions the account from the name and email attributes, then applies group membership from the identity provider. Check that the encryption key is set before enabling the flow, and confirm which attributes and group claims your provider actually sends.

Browser redirects, token validation and first-login provisioning for Metabase OIDC.

Questions teams ask before configuring Metabase OIDC

Does Metabase OIDC SSO need a paid plan?

Yes. OIDC is available on the Pro and Enterprise plans, not on Open Source or Starter. According to Metabase's pricing page, Pro is $575 per month, or $517.50 per month billed yearly, and includes the first 10 users, with additional users at $12 per month. Enterprise is priced by quote starting at $20,000 per year. Google sign-in and LDAP are available on the free and Starter plans if they meet your needs. Confirm current plan terms and user counts with Metabase before budgeting, because pricing can change.

Can our own team configure Metabase OIDC without a partner?

Often yes, if you already run an OpenID Connect provider and have an administrator who can create a client for Metabase. The configuration itself is a small set of settings, but the work around it is what takes time: confirming which claims the provider sends, deciding how users and groups map, testing login with real accounts, and documenting the result for your security review. Teams without an identity specialist, or those with several applications already depending on the same provider, often find it useful to have the design reviewed before the change goes live.

What drives the effort of an OIDC setup?

The main drivers are access to the identity provider, the claim design, the group model and the number of applications that share the provider. Access matters because someone must create the client, set redirect URIs and release group or attribute claims, which can involve change approvals. Claim design decides whether name, email and groups arrive in a form Metabase can use. The group model determines how many mappings you maintain and how you remove access. Each additional application that depends on the same provider adds testing and coordination.

What does the customer need to provide for the work?

Expect to provide an administrator for your identity provider, a DNS name and a TLS certificate for the Metabase site URL, and a production application database, which Metabase recommends running on PostgreSQL rather than the embedded H2 database. You will also need a test group of users who can sign in during validation, a named owner who approves the group model, and a change window if the instance serves active users. Confirm the exact list, including any network access between Metabase and the provider, in the written plan.

How long does an OIDC setup take?

Duration depends on scope, so it should be confirmed in a written plan rather than estimated from a general rule. The variables are how many identity providers and applications are involved, whether group synchronization is in scope, whether the application database still needs migrating from H2, and how many people must approve each change. Ask for the planned phases, the test cases, the rollback approach and the dependencies on your team's availability before you agree on dates.

Should we use SAML or SCIM instead of OIDC?

It depends on what your identity provider supports and what you need to automate. OIDC is a common choice for modern providers and provisions accounts at first login, passing name and email and optionally group membership. SAML is documented for Auth0, Entra ID, Google, Keycloak and Okta on Pro and Enterprise plans. SCIM provisioning also requires those plans and handles account creation and removal ahead of login, which matters when you need offboarding to be automatic. Compare the options with your identity team before choosing, and confirm the current capabilities in Metabase's documentation.

What should we check after the OIDC login works?

Test more than the first login. Verify that a new user is created with the expected name and email, that group membership changes in the provider are reflected after a sign-in, that a user removed from the required group loses access, and that local password logins are handled as your policy requires. Also confirm that the audit trail and administrator accounts behave as your security team expects. Record these results, because they form the evidence most reviewers ask for.

How to test OIDC before switching all users

Start with a small pilot group of named users and keep password or LDAP login working for every administrator until OIDC has passed the checks below. Before the pilot, record a documented admin fallback: at least two local administrator accounts with known credentials stored in your password vault, and a written procedure for re-enabling password login if the identity provider is unavailable. Confirm the fallback works by signing in with it on the test instance, not on the production one, and confirm that the MB_ENCRYPTION_SECRET_KEY value is backed up separately, because stored connection credentials cannot be read without it. Check that account provisioning works on first login: each pilot user should appear once in Metabase with the expected name and email, and no duplicate accounts should be created when a user signs in a second time.

Verify group membership on several users, not one. Pick pilot users who hold different identity provider groups, confirm each lands in the Metabase groups you mapped, and confirm that their data and collection permissions match what those groups should allow. Then test removal: take a pilot user out of the mapped identity provider group, have them sign in again, and confirm that Metabase access to the relevant data is removed. Also confirm what happens to a user removed from every group, and whether Metabase deactivates or simply retains the account, since your access review depends on that behavior. Document the exact identity provider client settings, scopes, claim names, group claim format and redirect URI used, so a reviewer can reproduce the configuration later.

Record evidence as you go: the test plan, the pilot user list, screenshots or exports of group membership before and after removal, the login and failure events from Metabase logs, and the sign-off from the owner of each identity provider group. Keep these with the change record for your access review. After every Metabase upgrade, repeat the pilot checks. Upgrades run application database migrations automatically, and the upgrade docs recommend backing up the application database first, so take that backup before upgrading and re-run provisioning, group sync and removal tests on the upgraded test instance before promoting it. Confirm the upgrade path with the Metabase upgrading documentation and the Metabase version support page for end-of-life dates of your current release.

How DeployOpen scopes and delivers Metabase OIDC SSO

DeployOpen plans, builds, tests and documents the OIDC connection between your identity provider and your self-hosted Metabase inside your own infrastructure. Engagements are fixed-scope, with the encryption key prerequisite, client settings, provisioning, attribute passing and group synchronization agreed in writing before work starts.

How we scope

  • Confirm your Metabase plan, since OIDC requires Pro or Enterprise, before any build work begins.
  • Document the identity provider, client settings, redirect targets and the attributes Metabase should receive.
  • Agree in writing which groups sync to Metabase groups and how removed memberships are handled.
  • Record who approves the scope and which environments, including staging, are in the agreed work.

How we build

  • Set up the encryption key prerequisite and confirm the application database is in place before configuration.
  • Configure the OIDC client and Metabase settings in the environment you specify, using your change process.
  • Test first login for provisioning, name and email attributes, and group membership with test accounts.
  • Verify that users with no group membership, or with the wrong group, get the access your policy requires.

How we hand over

  • Deliver a written configuration record covering client settings, attribute mappings and group mapping rules.
  • Document the login flow, the steps to add or remove a group mapping, and the recovery path for admin access.
  • Walk your identity and Metabase administrators through the setup and the test results before close.
  • Store configuration changes in your own repositories or change records so your team can review them later.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial handover.
  • Plan retesting of the OIDC login path before each Metabase upgrade, since upgrades run migrations automatically.
  • Agree with DeployOpen in advance how identity provider changes will be reviewed and retested.
  • Ask for the support scope, response expectations and escalation path in the written quote.

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.