How Metabase SAML SSO with Keycloak works and who can use it
SAML sign-in with Keycloak requires a Metabase Pro or Enterprise plan. Metabase's pricing page places SSO only in those two plans, so a self-hosted Open Source or Starter instance cannot use Keycloak SAML for staff sign-in, whatever the Keycloak configuration. The setup itself follows Metabase's documented SAML with Keycloak guide, so the first decision is licensing, not configuration. Confirm the plan tier with Metabase before scheduling any identity work, because the SSO requirement decides whether the rest of this page applies to your instance.
The documented pattern creates a SAML client in Keycloak with the client ID metabase. Its valid redirect URIs are your Metabase site URL followed by /*, so the site-url you set in Metabase and the redirect entry in Keycloak must match exactly, including the scheme and host. A mismatch is one of the most common reasons a SAML login fails at the redirect step. Record the site URL before you touch Keycloak, and check whether a reverse proxy or load balancer changes the hostname users see.
If your organization is on Open Source or Starter, the practical options are the Google sign-in and LDAP methods those plans include, or a licensing decision to move to Pro or Enterprise. Keycloak can still serve your other applications on its own, so the decision is about whether the Metabase license cost is justified by the SAML requirement. Ask Metabase for a current quote for the number of users you expect, because per-user pricing differs between Starter and Pro, and confirm with your Keycloak team which realm and client settings Metabase will depend on.
What you need before configuring Keycloak SAML for Metabase
Most SAML delays come from missing prerequisites rather than from the SAML settings themselves. The cards below cover the licence, the Metabase instance, the Keycloak side, the test accounts and the network path, in the order you should confirm them.
A Pro or Enterprise plan
SAML is included only in the Pro and Enterprise plans of Metabase, according to Metabase's pricing page. Open Source and Starter cannot use Keycloak SAML at all, so confirm the plan before any configuration work. Ask your Metabase contact to confirm which plan and edition your licence covers, and whether the licence key is already applied to the instance you will test on. Pricing for Pro starts from the listed monthly figure, and Enterprise is quoted individually.
Metabase pricingA running Metabase with a stable HTTPS site URL
Keycloak sends users back to Metabase at a fixed address, so the site URL must be final before you create the SAML client. Use a public HTTPS hostname with a valid certificate, and confirm that the Metabase site URL in admin settings matches it exactly, including scheme and any path. Changing the hostname later means updating the Keycloak redirect URIs and the Metabase SAML settings again.
A Keycloak realm and admin access
Plan to use a dedicated realm or a clearly named existing one for Metabase, and confirm you hold an admin account that can create clients, realm roles and group mappers. Confirm the Keycloak version against the current Keycloak release notes and your team's upgrade policy, since the current release is 26.8.1 and minor releases are planned four times a year. Record the realm name and the admin owner before you start.
Keycloak projectTest users and groups mapped to Metabase roles
Create a small set of test accounts in Keycloak that cover the cases you need to prove: an administrator, a standard analyst, and a user who should be denied access. Decide which Keycloak groups map to Metabase groups, because group sync is part of the Pro and Enterprise SAML setup and the mapping is easier to verify with known test accounts. Keep these accounts separate from production users until the flow is confirmed.
Network path between browser, Metabase and Keycloak
Three connections must work: the user's browser must reach both Metabase and Keycloak, and the Metabase server must reach Keycloak's metadata or endpoints if your setup requires it. Check DNS, firewall rules, proxy timeouts and any TLS certificate chain that Metabase must trust. Test each path with curl or a browser from the network where users sit, not only from the admin workstation.
Confirmed Metabase and Keycloak versions
Before you write any configuration, confirm the Metabase version against the current version support page and your upgrade policy, noting whether it is an LTS release. Also confirm the Keycloak version and the Metabase documentation for Keycloak SAML, because setup steps can change between releases. Record both versions in your change ticket so a later upgrade can be tested against the same SAML configuration.
Metabase version supportConfiguring the Keycloak SAML client and Metabase settings in order
This sequence connects a self-hosted Metabase Pro or Enterprise instance to Keycloak over SAML, so people sign in with their Keycloak accounts and an administrator controls access from one identity provider. Each step ends with a check that tells you whether the connection is ready to move on.
Confirm the Metabase site URL
Before touching Keycloak, the Metabase administrator records the exact site URL that users open in a browser, including the scheme, host and any path prefix, and confirms it under the Metabase admin settings for the instance URL. Keycloak's redirect URIs and the SAML endpoints are built from this value, so a mismatch later causes sign-in failures that look like identity provider errors. Done when the URL loads the Metabase login page over HTTPS from a clean browser session and matches the value written in your change record. Confirm the reverse proxy and TLS certificate serve that same address, because the SAML flow returns users to it.
Create the SAML client in Keycloak
A Keycloak administrator opens the target realm in the admin console and creates a new client with the client type set to SAML and the client ID set to metabase, following Metabase's documented Keycloak setup. Keep the realm that holds your workforce users, since accounts outside that realm will not be able to sign in. Done when the client appears in the realm's client list with the ID metabase and the SAML protocol selected. Keep the Keycloak admin console session open for the next step.
Set valid redirect URIs to the site URL
In the new client's settings, the administrator sets the valid redirect URIs to the Metabase site URL from the first step followed by /*, which is the pattern Metabase's documentation describes. Use the same scheme and host, with no trailing differences, and avoid broad wildcards beyond that path. Done when the saved client shows exactly one redirect URI entry matching the site URL with /* appended, and a test request from the browser reaches the Keycloak login page without a redirect-URI error. Record the value so it can be compared during troubleshooting.
Export the Keycloak SAML metadata
The administrator obtains the identity provider metadata for the realm from Keycloak's SAML descriptor endpoint or from the client's installation options, then saves the XML or copies the entity ID, single sign-on URL and signing certificate that Metabase asks for. Confirm which signing certificate is active, because a rotated key that Metabase does not know about will reject assertions. Done when the metadata is fetched successfully from the realm endpoint and the entity ID and certificate in the file match what the Keycloak client shows. Ask your Keycloak administrator to confirm the realm and certificate before you copy them.
Enter the SAML settings in Metabase admin
A Metabase administrator on a Pro or Enterprise plan opens the admin settings for authentication, selects SAML and enters the identity provider values from the metadata, including the sign-on URL, entity ID and certificate. The Metabase site URL must match the one used in Keycloak. Save the configuration and confirm that the SAML option is enabled for the instance. Done when the settings save without a validation error and the Metabase login page shows the Keycloak sign-in option. If the option does not appear, confirm that the instance runs a plan that includes SSO before continuing.
Map user attributes for email and name
The administrator maps the SAML attributes that Keycloak sends, such as email, first name and last name, to the fields Metabase uses to create and match accounts. Attribute names in Keycloak are set by the client's mappers, so confirm the exact names in the SAML assertion rather than guessing them. Keep the email attribute consistent with the Metabase account identity so existing users are matched and not duplicated. Done when a sample assertion or the Keycloak client's evaluated user attributes show the expected values for a test user. Ask your identity team to confirm which attributes are authoritative.
Test sign-in with a non-admin account
The administrator signs out of Metabase and Keycloak, then signs in through the Keycloak option using a standard user account that has no Metabase admin rights, and checks that the user lands on the expected home page with only the permissions granted to their groups. Repeat with a second account if your group model depends on separate groups. Done when the test account signs in without a SAML error, appears in the Metabase people list with the correct email, and cannot open admin settings. Keep a record of the successful test so the change is traceable.
How the Keycloak and Metabase login flow fits together
SAML sign-in is a browser-driven exchange, and the trust between Metabase and Keycloak is set up once, in configuration, before any user logs in. When a person opens a self-hosted Metabase Pro or Enterprise instance, Metabase acts as the service provider and redirects the browser to Keycloak, which acts as the identity provider. Keycloak authenticates the user, then posts a signed SAML assertion back through the browser to Metabase's assertion consumer endpoint. Metabase accepts the assertion only if it trusts the issuer and the signature, and then maps the user to an account. Each hop passes through the browser, so the redirect URIs and site URL configured on both sides must match exactly.
Trust rests on two exchanged artifacts: the identity provider metadata that Metabase consumes, and the signing certificate that Keycloak uses to sign assertions. The Metabase documentation for SAML with Keycloak has you create a SAML client with the client ID metabase and valid redirect URIs set to your Metabase site URL followed by /*. Confirm with the Metabase and Keycloak docs which signing and encryption options each version supports, whether assertions or responses must be signed, which algorithms are accepted, and how certificate rotation is handled. Those choices determine what a certificate change will break, so record them in your build notes before go-live.
Plan for failure at the trust boundary, not just at the login screen. A clock skew between servers, a site URL that differs from the one in the client configuration, or a certificate that was rotated on one side only will each produce a sign-in failure that looks like a password problem to end users. Your team should test a full sign-in with a dedicated account, confirm which Metabase group and role the user lands in, and check that Keycloak's sign-in events show the same session. Assign an owner for certificate and metadata changes, because those are the changes most likely to lock out every user at once.
Where the SAML login passes between browser, Metabase and Keycloak
The login starts in the user's browser, which requests the Metabase sign-in page and is sent to Keycloak with a SAML authentication request. Keycloak sits outside the company network boundary, so the user's credentials are entered there and never at Metabase. Keycloak then returns a signed SAML assertion through the browser to Metabase, which creates or matches the account. Check that the SAML client ID and redirect URI match the Metabase site URL before testing.
The SAML request, sign-in at Keycloak and assertion returned to Metabase.
Mapping Keycloak users, groups and attributes to Metabase accounts
This table compares each Keycloak identity element with what Metabase does with it, and which part depends on a paid plan. Read it before building the SAML attribute mappers, because the basic sign-in fields and the advanced group and attribute sync behave differently. Confirm each mapping rule against Metabase's people and groups documentation for your version before you rely on it.
| Keycloak element | What it carries | How it lands in Metabase | Plan requirement |
|---|---|---|---|
| User email | Login identifier sent in the SAML assertion | Used to match or create the Metabase account on first sign-in | Pro or Enterprise for SAML SSO |
| First and last name | Display name attributes in the assertion | Populates the Metabase user profile name fields | Pro or Enterprise for SAML SSO |
| Group membership | Group names sent as a SAML attribute if a mapper is defined | Advanced group sync depends on the paid plan, so confirm the exact group mapping rules for your version | Advanced group sync requires Pro or Enterprise |
| Custom role or attribute | Values such as department or tenant sent as extra assertion attributes | Attribute sync into Metabase user attributes is a paid feature, so confirm supported attribute names | Advanced attribute sync requires Pro or Enterprise |
| Realm roles and client roles | Role names that Keycloak can include in tokens or assertions | Not mapped automatically; translate them to Metabase groups through a documented rule or manual assignment | Confirm with the Metabase docs before design |
| Disabled Keycloak user | Account state held in Keycloak, not in the assertion | Sign-in fails at Keycloak, but an existing Metabase account stays active until deactivated in Metabase | Deprovisioning by SCIM requires Pro or Enterprise |
Security settings that protect Metabase SAML sign-in
Metabase SAML sign-in depends on settings across three places: the Metabase site URL, the Keycloak SAML client, and the Keycloak admin console. A weak choice in any one of them can let someone sign in who should not, or lock out every administrator when something breaks. The cards below cover the settings to review before go-live and the checks to repeat after each change.
Serve Metabase over HTTPS only
The Metabase site URL is the base for every SAML redirect and callback, so the address your users type and the address configured in Metabase and Keycloak must match and use HTTPS. Confirm that the reverse proxy or load balancer in front of Metabase terminates TLS with a valid certificate and that plain HTTP requests redirect or fail. Check that the site URL in Metabase admin settings uses the final public hostname, not an internal address. Mismatches here are a common cause of failed SAML logins.
Metabase SAML docsRestrict redirect URIs to the exact host
The Metabase documentation sets valid redirect URIs on the SAML client to the Metabase site URL followed by /*. Use that pattern for the one production hostname only, and remove staging, wildcard or leftover test entries from the metabase client. A broad redirect list lets a crafted redirect send a signed-in user's session to a host you do not control. Review the list in the Keycloak admin console after every change to the client.
Plan certificate rotation and metadata handling
The SAML client signing and encryption certificates expire, and Metabase must trust the current key material. Record the certificate expiry date, the owner of the rotation and where the identity provider metadata was imported from. Confirm with Metabase's current SAML settings how a new certificate or metadata file is loaded, and test the change in a staging instance before production. Keep the metadata source under change control so an unexpected file cannot replace the trusted configuration.
Keep a local admin for break-glass access
If Keycloak is down, its certificate has expired or the SAML configuration is wrong, nobody can sign in through SSO. Keep at least one Metabase administrator account with a password that is stored in your secrets system, and test that it still works after each SSO change. Restrict its use to documented recovery events and log each use. Confirm with Metabase's current authentication docs that a local admin remains available while SAML is enforced in your version.
Lock down Keycloak admin console access
Anyone with realm administration rights in Keycloak can change the SAML client, its redirect URIs, the signing keys and the users who can sign in to Metabase. Limit the admin console to a small named group, require multi-factor authentication for those accounts, and keep admin access off the public internet where your network allows. Use separate realms or clients for workforce and customer identities if both exist, so a change in one does not affect the other. Review the admin role list each quarter.
Keycloak admin guideLog sign-in events and changes
Keep Keycloak event logging on for logins, failed logins and admin events, and send those logs to your central log platform with a retention period set by your policy. Also log Metabase authentication and admin activity. Test that a failed SAML login and a change to the SAML client both produce a traceable record, because access reviews and incident investigations depend on it. Confirm which event types your Keycloak version records by default and which must be enabled, and confirm the retention limits of your log store.
Keycloak metrics guideWhy Keycloak SAML sign-in to Metabase fails and how to fix it
This table lists the sign-in failures teams most often hit when wiring Keycloak SAML into a self-hosted Metabase, with the cause and fix for each. Read it when a login loops, returns an error, or leaves a user without access, and work down the rows against your own Keycloak client and Metabase settings.
| Failure | Likely cause | Fix |
|---|---|---|
| Redirect URI rejected by Keycloak | The Keycloak client's valid redirect URIs do not match the Metabase site URL, or the trailing /* is missing | Set valid redirect URIs to the exact Metabase site URL followed by /* in the metabase client, and confirm the site URL in Metabase admin settings matches the address users type |
| Wrong site URL after a move or proxy change | Metabase still points at an old hostname, http instead of https, or a port the reverse proxy no longer exposes | Correct the site URL in Metabase, update the Keycloak client to match, and retest from a private browser session |
| Signature or metadata mismatch | The IdP certificate was rotated in Keycloak but Metabase still holds the old metadata or certificate | Re-import the current Keycloak SAML metadata or certificate into Metabase, then confirm the client signing settings have not changed |
| User signs in but gets no account | The email attribute sent by Keycloak does not match a Metabase user email, or the attribute mapper is missing | Check the email mapper in the Keycloak client, compare it with the Metabase user email, and confirm the user exists or that just-in-time creation is enabled |
| Assertion rejected as expired or not yet valid | Clock skew between the Keycloak host, the Metabase host and the browser | Synchronize time on all servers with NTP and confirm the assertion validity window is not shorter than the skew |
| SSO option missing or refused | The instance runs Open Source or Starter, where SSO is not included | Confirm the plan on Metabase's pricing page, then upgrade to Pro or Enterprise or use a supported open source sign-in method such as Google or LDAP |
| Users locked out after SSO enforcement | Local admin login was disabled before SSO was tested, leaving no working admin password | Keep at least one local admin account with a tested password until SSO is verified, and document the break-glass procedure before turning local login off |
What open source Metabase users can do instead of SAML
If your organization runs a self-hosted Open Source or Starter Metabase, SAML is not available to you. The pricing page lists SSO as included only in the Pro and Enterprise plans, and Metabase's people and groups documentation places SAML, JWT, OIDC and SCIM provisioning in the same paid tier. What remains on the free and Starter plans is Google sign-in and LDAP, along with local Metabase accounts with email and password. Choose between these options before you build the Keycloak client, because a Keycloak SAML client does nothing for a Metabase instance on a plan without SAML.
Keeping local accounts means Metabase holds its own user records, passwords and deactivation process. Keycloak can still serve as the identity provider for your other applications, so your team keeps one place for sign-in policy, MFA and joiner and leaver tasks for those systems, while Metabase remains a separate login. The cost of this approach is that offboarding becomes a manual step in Metabase, and a leaver's access persists until someone removes the account. Define a shared password policy that matches your Keycloak policy for length, rotation and lockout, and record who is responsible for disabling Metabase accounts when staff change roles.
Confirm current plan terms on Metabase's pricing page before you decide, because included features and per-user prices change over time. Ask your Metabase contact in writing which sign-in methods your intended plan includes, and whether any Keycloak-based option you plan to use depends on a particular plan. If your requirement is central SAML sign-in with Keycloak, the budget question is whether a Pro or Enterprise quote is cheaper than the staff time you would spend managing separate local accounts.
Questions buyers ask before configuring Keycloak SAML for Metabase
Does SAML single sign-on with Keycloak require a paid Metabase plan?
Yes. SSO is included only in the Pro and Enterprise plans, according to the Metabase pricing page, so Open Source and Starter installations cannot use SAML with Keycloak. Pro is listed at $575 per month, or $517.50 per month billed yearly, with the first 10 users included and additional users at $12 per month. Enterprise is priced by quote starting at $20,000 per year. Pick the tier by counting users and by checking which other features you need, such as row and column level permissions, which sit in the same paid tiers. Confirm current pricing with Metabase before budgeting, because list prices can change.
What drives the effort of configuring Keycloak for Metabase?
The Metabase side of the SAML setup is small. The work grows with the Keycloak side: how many realms and clients already exist, whether the Keycloak server is already clustered and backed by a supported production database, and how users and groups are modeled. Metabase's documented setup creates a SAML client with client ID metabase and valid redirect URIs set to the Metabase site URL followed by /*. Attribute mapping, group mapping and the choice of signing and encryption settings add more steps. Testing with real accounts, including users who should be denied, takes time. Ask for each of these items to be listed separately in any quote.
Can an internal team configure Keycloak SAML for Metabase alone?
Often yes, if the team already runs Keycloak and has admin rights to both systems. The documented client setup is straightforward for someone who knows Keycloak realms, clients and SAML metadata. An internal team usually struggles with the surrounding decisions: production hosting for Keycloak, the database and high availability design, certificate rotation, and how group claims map to Metabase permissions. Consider a partner for design review or a fixed-scope build if these are new to your staff. DeployOpen plans, implements and documents this kind of work inside your own infrastructure, with scope and deliverables agreed in writing before work starts.
What does the work need from identity and Metabase administrators?
The work needs both teams to agree on a few decisions before anyone changes a setting. Identity administrators own the Keycloak realm, the metabase SAML client, the user attributes and group membership that Metabase will read. Metabase administrators own the SAML configuration in the admin settings, the group mappings that decide which permissions people receive, and the choice of which accounts keep local logins as a fallback. Both teams need a test plan, a named owner for certificate and metadata changes, and a rollback path. Without agreement on these points, sign-in may work while access levels are wrong.
How do Keycloak version updates affect the Metabase SAML setup?
Keycloak updates can change the environment that the SAML client depends on, so they should be tested against a staging copy first. Keycloak has said that breaking changes in minor releases will be opt-in since Keycloak 26.0, and that it plans four minor releases a year, which makes regular updates a normal part of operations. The current release is 26.8.1, published October 13, 2026. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. Keycloak also migrates its database schema automatically at startup by default, so back up the database before each upgrade.
How do Metabase upgrades affect SAML sign-in?
Metabase upgrades run application database migrations automatically, so the SAML settings are stored in the application database and carry forward, but the sign-in flow should still be retested after each upgrade. The Metabase docs recommend backing up the application database first, reducing a cluster to a single node for major upgrades because of a migration lock, and upgrading release by release from versions older than 40. Metabase 64 is an LTS release published on 16 September 2026 with end of life on 1 December 2027, and LTS versions are supported for 14 months. Plan upgrades to land within that support window, and test SSO on a copy of production first.
What should a quote for Keycloak SAML for Metabase include?
A useful quote lists the scope in writing, with each item named separately:
- Current state review of Keycloak, Metabase, the application database and the hostnames users sign in through
- Metabase plan confirmation, since SAML requires Pro or Enterprise
- Keycloak client setup, redirect URIs, attribute and group mapping, and certificate handling
- Test cases covering allowed users, denied users, group-based permissions and the local fallback account
- Documentation, runbook, and a rollback plan for Keycloak and Metabase upgrades
- Who pays for what: licenses, infrastructure, and the hours for each role, with any one-time and recurring items marked
Ask the provider to state which items are excluded so the boundary is clear.
Can open source Metabase users get SSO without paying for a plan?
Open Source and Starter users cannot use SAML with Keycloak, but Metabase's open source and Starter plans do support Google sign-in and LDAP. Those options can be a bridge if Keycloak is not required for these users. Confirm which sign-in methods your chosen tier supports before designing around them. If your organization already runs Keycloak for other applications, decide whether the cost of a Pro or Enterprise plan is justified by the access controls, audit features and SAML support it adds.
How DeployOpen scopes and delivers Metabase Keycloak SSO
DeployOpen starts with your Metabase edition, your Keycloak realm and your access model, then agrees the SAML setup in writing before any change is made. The work runs in infrastructure you control, with testing, documentation and handover covering both the Metabase and Keycloak sides of the sign-in.
How we scope
- Confirm the Metabase plan first, since SAML SSO requires Pro or Enterprise and open source cannot use it.
- Record the Keycloak version, realm layout, database and whether the existing Keycloak runs in your own infrastructure.
- Agree in writing which Metabase groups map to which Keycloak groups, and who approves each mapping.
- Engagements are fixed-scope, so deliverables and timelines are written down before work starts.
How we build
- Create the SAML client in Keycloak following Metabase's documented setup, with redirect URIs set to your site URL followed by /*.
- Configure Metabase SAML settings, attribute mapping and group sync in a staging instance first.
- Test sign-in, sign-out, group changes and denied access with named test accounts before any production cutover.
- Keep the Keycloak client secrets and signing certificate handling inside your secrets process, not in tickets or chat.
How we hand over
- Deliver a configuration record covering each Metabase and Keycloak setting, its owner and its change procedure.
- Document the test cases used, the results and the steps to repeat them after a Metabase or Keycloak upgrade.
- Walk your identity and platform teams through the runbook so they can rotate certificates and review group membership.
- Provide the evidence your compliance team can review for access control and sign-in logging.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainer work can cover Metabase upgrades and Keycloak release changes that affect the SAML client.
- Confirm with DeployOpen in the written scope which environments, versions and response arrangements a retainer includes.
- Re-test sign-in after each change to Metabase, Keycloak, the reverse proxy or the identity provider certificate.

