Keycloak vs authentik for Grafana SSO: which one fits your team
Both Keycloak and authentik connect to Grafana through the same OpenID Connect pattern: Grafana's generic OAuth section sends users to the provider's authorization endpoint and reads the claims that come back for login, email, name, role and groups. The decision therefore rests on two questions. The first is which identity platform the team wants to run for its other applications, because that platform carries the operating work for every app that depends on it. The second is whether the team needs Grafana Enterprise features such as team sync, which Grafana documents for Grafana Enterprise and Grafana Cloud only. The general comparison of the two products sits on the sibling page Keycloak vs authentik, so the paragraphs below focus on fit with Grafana.
Keycloak fits a team that wants one Apache-2.0 identity server for Grafana and its other applications, including SAML-only apps and users it federates from Active Directory. For Grafana, create a Keycloak client, then set auth_url, token_url and api_url under [auth.generic_oauth] so they point at Keycloak. The Keycloak guide in Grafana's docs maps the claims to email, login, name, role (role_attribute_path) and groups, and it supports optional single logout through signout_redirect_url. Budget for the platform underneath: Keycloak needs a relational database in production, and PostgreSQL 14 to 18 is among the supported options. Grafana's SAML authentication and team sync are documented for Grafana Enterprise and Grafana Cloud, so on open source Grafana, test the role claim in a real token before cutover.
authentik fits a team that wants a single OpenID Connect provider for Grafana and a few other applications, is comfortable with an MIT-licensed core, and does not need Keycloak's wider protocol set. Its Grafana integration guide uses the OAuth2/OpenID Connect provider with GF_AUTH_GENERIC_OAUTH_* environment variables for Docker, standalone and Helm installs. Its role mapping example returns Admin, Editor or Viewer, and allow_assign_grafana_admin is needed only if the path can return GrafanaAdmin, so leave it unset unless you plan to grant server admin through the provider. On authentik versions before 2026.5, all redirect URIs are treated as Authorization type, so add only the authorization URL there. Check the enterprise boundary before you commit: code under authentik/enterprise needs a paid subscription for production use, and enhanced audit logging and Microsoft Entra ID integration are Enterprise-only features. If your audit or identity-source requirements depend on them, get the subscription terms in writing before you build on the open-source core.
Keycloak vs authentik for Grafana SSO side by side
This table compares Keycloak and authentik on the points that decide how Grafana sign-in is built, supported and maintained. Read each row against your Grafana edition, since SAML and team sync are documented for Grafana Enterprise and Grafana Cloud. The main takeaway is that both connect through OpenID Connect, while the logout, group sync and provisioning details for each provider still need confirmation with the vendor.
| Aspect | Keycloak | authentik |
|---|---|---|
| Sign-in path and SAML | OpenID Connect via Grafana's generic OAuth. Keycloak also speaks SAML 2.0, but Grafana SAML login is documented for Enterprise and Cloud only. | OpenID Connect via Grafana's generic OAuth settings. authentik also has a SAML provider, but Grafana SAML login is documented for Enterprise and Cloud only. |
| Grafana guide support level | Grafana publishes a Keycloak page in its authentication docs. Confirm who supports your configuration and on what terms with Grafana or Keycloak. | The authentik integration guide lists its support level as authentik. Confirm the support terms for your Grafana version with authentik before you rely on it. |
| Install options | Server distribution, plus the Keycloak Operator for Kubernetes and OpenShift, installed through OLM or kubectl. | Server and worker containers with an embedded outpost. Confirm the packaging for your platform, such as Kubernetes, with authentik. |
| Production database | Relational database required in production: PostgreSQL 14 to 18, MariaDB, MySQL, SQL Server, Oracle or Aurora PostgreSQL. The development file database is not for production. | PostgreSQL stores configuration and data. Confirm the supported PostgreSQL versions and backup approach with authentik for your release. |
| Role mapping | Grafana's page maps a Keycloak role claim through role_attribute_path. Confirm your client emits that claim through its protocol mappers. | The guide example returns Admin, Editor or Viewer through role_attribute_path. Set allow_assign_grafana_admin only if the path can return GrafanaAdmin. |
| Single logout | Grafana supports optional single logout through signout_redirect_url. Confirm how your Keycloak logout endpoint and session settings behave. | Confirm with authentik whether its Grafana guide covers single logout and how it reaches Grafana sessions. |
| Group sync | Grafana team sync for Keycloak is marked available in Grafana Enterprise and Grafana Cloud. Groups arrive through the groups attribute. | Confirm group sync to Grafana teams with authentik, including whether it requires Grafana Enterprise or Grafana Cloud. |
| SCIM provisioning | Keycloak's SCIM API provisions users into Keycloak, listed as supported in 26.8. Confirm whether Keycloak can push users or groups into Grafana. | authentik can use an optional SCIM provider as a backchannel to push users to an app. Confirm that Grafana is a supported target. |
| Licensing and current release | Apache-2.0, CNCF incubating. Current release 26.8.1, released October 13, 2026. | MIT core. Code under authentik/enterprise needs a paid subscription for production. Current release 2026.8.4, released October 14, 2026. |
Setup steps for Keycloak vs authentik for Grafana SSO
Keycloak setup for Grafana has two sides. First you create an OpenID Connect client in the Keycloak admin console, then you point Grafana's generic OAuth section at that client. The Grafana Keycloak guide is the reference for the callback path and attribute names.
- Database first. Keycloak needs a production relational database. The development file database is not suitable for production, so provision a supported database, such as PostgreSQL 14 to 18, before you build the client. Confirm the choice with your database team, because it sets your backup and upgrade work.
- Client and redirect. Create the OpenID Connect client for Grafana and set the redirect to the Grafana callback path from the guide. Match your Grafana root URL exactly, including the scheme.
- Endpoints. In the
[auth.generic_oauth]section, setauth_url,token_urlandapi_urlto the authorization, token and userinfo endpoints of your own Keycloak realm. Copy them from your instance's OpenID configuration document and do not type them from memory. - Attribute mapping. Map the email, login, name, role and groups claims to Grafana's attributes. Put the claim mappers in a client scope so the values reach the token, then test with one user in each group. Keep
role_attribute_pathaligned with the claim names you configured. - Optional signout. Set
signout_redirect_urlonly if you want Grafana sign-out to also end the Keycloak session. Test logout in your own environment, because the result depends on how your clients and sessions are configured.
Before go-live, confirm that the client secret is held outside plain configuration files and that the redirect entry matches the callback exactly.
authentik's Grafana guide uses an OAuth2/OpenID Connect provider with Grafana's generic OAuth settings, which are passed as GF_AUTH_GENERIC_OAUTH_* environment variables. The same variable approach applies to Docker, standalone and Helm installs, so most of the work is building the provider and placing the values where your install reads them. The authentik Grafana integration page lists the support level and the current steps.
- Provider and application. Create an OAuth2/OpenID Connect provider, then an application that uses it. Record the client ID, the client secret and the endpoint values the provider shows, because Grafana needs all three.
- Redirect entries. Before authentik 2026.5, all redirect URIs were treated as Authorization type, so only the authorization URL should be added in those versions. Confirm which redirect entries your version expects before you test, because the entry type changes what you enter.
- Install placement. In Docker, pass the
GF_AUTH_GENERIC_OAUTH_*variables to the Grafana container. In a standalone install, set them in the environment of the Grafana service. In Helm, set them through the Grafana chart values, and confirm the key your chart version uses. - Role mapping. The guide's
role_attribute_pathexample returns Admin, Editor or Viewer from the token claims. Test the expression with one account per role, and check the result in Grafana rather than trusting the expression alone. - GrafanaAdmin access. Set
allow_assign_grafana_adminonly if your role path can return GrafanaAdmin. If the path never returns it, leave the setting out so no token can grant server administration.
Before rollout, confirm the redirect entry type for your authentik version and sign in with a non-admin account for each expected role.
Both setups can sign users in and still assign the wrong access, so this tab covers checks that apply to either identity provider. Grafana documents team sync, SAML authentication and active sync as available in Grafana Enterprise and Grafana Cloud only, so plan group-based access around the edition you run. The Grafana authentication overview lists the supported methods for each.
- Role test. Sign in with one test account per role and confirm Grafana grants the expected permissions for Admin, Editor and Viewer. Record the account, the claim value and the result for each.
- Negative test. Sign in with a user who has none of the mapped groups. Confirm that the access matches the default role your design sets, and that no broader role appears.
- Edition check. Confirm your Grafana edition before you design team membership. Keycloak team sync is documented for Grafana Enterprise and Grafana Cloud, so an open source deployment needs a different plan for team membership.
- Claims and logs. Inspect the claims a test user receives and check Grafana's logs for sign-in errors after each change. A missing groups claim is often the first thing to check when a role is wrong.
- Upgrade recheck. After each Keycloak, authentik or Grafana upgrade, recheck redirect entries, environment variable names and the role path. Keycloak states that breaking changes in minor releases are opt-in, so review which opt-ins apply to your deployment.
Store the test results with the change record so your security and compliance reviewers can see the same evidence you used to approve the setup.
How a Grafana login flows through Keycloak or authentik
This illustrative diagram sketches a generic OpenID Connect sign-in. It starts when the user opens Grafana, which redirects the browser to the auth_url set in the auth.generic_oauth section. After sign-in, the identity provider returns an authorization code to the Grafana callback, and Grafana exchanges it at token_url. Grafana then reads user claims at api_url and maps email, login, name, role and groups to a Grafana user. Check that your role mapping matches the groups you expect. The optional single logout through signout_redirect_url comes last. This is a sketch from the documented steps, not a captured trace.
Illustrative generic OpenID Connect flow, modeled on documented steps.
How users, groups and roles reach Grafana from each provider
Each provider reaches Grafana through its own settings, so one user can end up with different access depending on the path. The four areas below cover account matching at sign-in, team membership, role assignment and removal of access. Check each one against your Grafana edition, since team sync and active sync are documented for Grafana Enterprise and Grafana Cloud.
User accounts at sign-in
Both providers send Grafana an OpenID Connect sign-in through Grafana's Generic OAuth section, auth.generic_oauth. Grafana's Keycloak page maps the claims to the email, login and name attributes, so those claims decide which Grafana account a sign-in matches. authentik's guide follows the same pattern with GF_AUTH_GENERIC_OAUTH_* settings for Docker, standalone and Helm installs. Before go-live, choose the login claim deliberately and sign in with an existing account to see which record Grafana matches. Confirm in Grafana's configuration reference how new accounts are created and how attributes refresh on later sign-ins.
Groups and team membership
Grafana's Keycloak page maps a groups attribute, but Grafana documents team sync for Keycloak only in Grafana Enterprise and Grafana Cloud. If you run Grafana open source, plan team membership without relying on that feature, and confirm the alternative with Grafana before design work starts. For authentik, confirm the group approach in its Grafana guide, including which claim carries group names and where team mapping happens. Ask both vendors to show the mapping for one test user from each group before you build folder and dashboard permissions on top of it.
authentik Grafana guideRoles from claims
Both providers can drive Grafana's role through role_attribute_path, which reads a claim and maps its value to a Grafana role. authentik's guide includes an example path that returns Admin, Editor or Viewer. Leave the GrafanaAdmin gate off unless you need it: authentik's guide says allow_assign_grafana_admin is only needed if the path can return GrafanaAdmin. For Keycloak, write the path against the claim your realm emits, and confirm the expression on Grafana's Keycloak page. Test each role with a user from that group before go-live.
Deprovisioning with SCIM
Keycloak's SCIM API provisions users into Keycloak, so it fills the identity store that signs users in to Grafana. authentik's SCIM provider can push users to an app as a backchannel, separate from sign-in. Neither is documented here as feeding Grafana accounts, so removing a user in the identity provider cannot be assumed to disable their Grafana account. Grafana's SCIM provisioning is documented for SAML, with Entra ID and Okta named as supported providers, and active sync is listed for Grafana Enterprise and Grafana Cloud. Confirm how a disabled user is handled in Grafana before you rely on the identity provider for offboarding.
Keycloak admin guideDocumented limits and what to confirm before you commit
Grafana's edition decides which SSO features you can use at all, so confirm it first. The Grafana Keycloak setup page marks team sync as available in Grafana Enterprise and Grafana Cloud, and Grafana's authentication documentation places SAML authentication and active sync in the same two editions. Grafana's authentication overview marks SCIM provisioning as supported for SAML and names Entra ID and Okta as the supported identity providers for it. Keycloak's SCIM API lets external systems provision users into Keycloak itself, and authentik's SCIM provider is an optional backchannel for pushing users to an app. Neither product is named as a supported SCIM source for Grafana, so ask Grafana in writing whether automated provisioning covers your identity provider and edition before you design around it.
authentik's core is MIT licensed, but several controls that SSO rollouts often need sit in the Enterprise Edition: Google Workspace and Microsoft Entra ID integrations, mTLS client certificate authentication, privileged access management and enhanced audit logging. The authentik pricing page lists Enterprise at $5 per user per month billed annually plus $0.02 per external user per month, and Enterprise Plus starting at $20k annually. The Open Source tier is free and supported only through the community Discord. The Grafana OIDC setup runs on authentik's OAuth2 and OpenID Connect provider, so the decision is which surrounding features your staff logins and compliance team require. Ask authentik for a written quote that prices your internal and external user counts, and confirm which tier includes the audit logging your reviewers expect.
Keycloak is licensed under Apache-2.0, so the server itself carries no license fee. Any support is a separate contract, and that cost, along with the staff who run the server, belongs in your quote. On upgrades, the Keycloak project plans four minor releases a year and a major release every two to three years, and says breaking changes in a minor release will be opt-in, as described in its release updates post. authentik supports the 2026.5.x and 2026.8.x lines and announces security releases at least 24 hours in advance. Set a patch window on the identity side that can absorb that notice, and retest each Grafana login path after every identity provider upgrade, including the role mapping, before the change reaches production.
Questions buyers ask about Keycloak vs authentik for Grafana SSO before hiring help
How much effort does Grafana SSO take with Keycloak or authentik?
For a basic OpenID Connect login, the effort is mostly configuration: a Grafana client in the identity provider, the [auth.generic_oauth] settings in Grafana, and a role mapping. The larger effort comes from design decisions. Keycloak needs a relational database in production and a deployment plan before the login step starts, which is often the larger share of the work for a team new to it. authentik's Grafana guide covers Docker, standalone and Helm installs with GF_AUTH_GENERIC_OAUTH_* settings, so the Grafana side is similar on both. Effort rises with the number of Grafana instances, a role model that must return Admin, Editor or Viewer from group membership, and any need for team sync or SAML, which Grafana documents only for Grafana Enterprise and Grafana Cloud. Ask each implementer to list those items separately in the quote.
How long does a Keycloak or authentik Grafana SSO setup take?
No fixed duration applies, because the time depends on the environment and the decisions made before setup begins. Start with the identity provider. A Keycloak deployment that carries production traffic needs its database, backups, TLS and upgrade path settled, and those tasks often take longer than the Grafana change itself. An authentik install follows its documented Docker, standalone or Helm guide, but production still needs the database and secrets handled for your environment. Other schedule drivers are the number of Grafana instances, your change approval cycle, and whether SAML or team sync adds a second integration track. Ask the implementer for a written timeline tied to the scope, and check it against your change windows.
What does the team need to provide for Grafana SSO integration?
The team must provide access, decisions and environment details before configuration starts. Typical inputs include:
- Administrative access to the identity provider, Grafana, and the database or hosting platform each one runs on.
- Group and role definitions, including which groups map to Admin, Editor or Viewer, and whether any user should receive GrafanaAdmin, which authentik only needs to allow if the role path can return it.
- Public URLs for Grafana and the identity provider, TLS certificates, and the redirect URI list.
- A decision on single logout, since Grafana's signout_redirect_url is optional.
- A named approver and a test plan covering each role and at least one denied user.
Can an in-house team set up Grafana SSO without outside help?
Yes, a team with Grafana and identity administration experience can usually handle the basic OpenID Connect setup alone, because both platforms publish working Grafana configuration guides. The harder part is running the identity provider itself. Keycloak needs a supported relational database in production, a deployment method (the Keycloak Operator on Kubernetes or the server distribution on virtual machines), and an upgrade plan, since the project plans four minor releases a year. authentik needs PostgreSQL for its configuration and data, plus its server and worker containers. If your team has not run either in production, outside help is most useful for hardening and handover. Consider outside help when the scope includes SAML, group sync across several Grafana instances, or evidence for an assessment. DeployOpen plans and implements self-hosted platforms in your own infrastructure, and the scope is agreed in writing before work starts.
What drives the cost of hiring outside help for Grafana SSO?
The cost follows the written scope, and the main drivers are the amount of integration work and the operating duties that follow it. Cost components include design, identity provider deployment, Grafana configuration, testing and handover. Ongoing support, upgrades and continuous testing are retainers, so ask which items are one-time and which recur. Costs rise with the number of applications sharing the identity provider, a role model with many groups, database operations such as backups and high availability, and SAML or group sync requirements. If a design needs an authentik Enterprise feature, the authentik pricing page lists Enterprise at $5 per user per month billed annually plus $0.02 per external user per month, so confirm which features need it. DeployOpen does not publish a price list. A quote follows from the written scope.
Which identity provider should I pick if I have none yet?
Choose based on who will run it and which protocols you need, since both can serve Grafana's generic OAuth flow. Keycloak suits teams that need SAML 2.0 next to OpenID Connect, LDAP or Active Directory federation, brokering to external providers, and an admin console a dedicated identity team will operate. It needs a relational database in production. authentik suits a smaller team that wants OAuth2/OpenID Connect, SAML, LDAP, RADIUS and proxy providers in one product, with MIT-licensed core code and a Grafana guide that uses the same GF_AUTH_GENERIC_OAUTH_* settings. Confirm early whether you need Grafana team sync or SAML, because Grafana documents both for Grafana Enterprise and Grafana Cloud, which affects Grafana licensing as well as the identity provider. Have an implementer test both options against your role model before you commit.
How DeployOpen sets up Grafana SSO with either provider
DeployOpen scopes Keycloak or authentik for Grafana SSO as a fixed-scope engagement, with the Grafana edition, the role mapping and the logout behavior agreed in writing before work starts. The build covers the Grafana generic OAuth configuration, claim and role mapping, and tests that show who can sign in and what each role can do in Grafana. Ongoing support is available as a retainer for upgrades and retesting.
How we scope
- The written scope names the identity provider, the Grafana edition and the login roles Grafana should map.
- Team sync needs Grafana Enterprise or Grafana Cloud, so the scope must confirm the edition in use.
- Engagements are fixed-scope, and the written scope is agreed before any work starts; ongoing support is available as a retainer.
How we build
- Configures the Grafana generic OAuth settings for the chosen provider, including the auth, token and API endpoints.
- Maps email, login, name, role and group claims, and tests the role path so Admin, Editor and Viewer resolve correctly.
- Keeps GrafanaAdmin off the role path unless needed, and checks redirect URI types for the authentik version.
How we hand over
- Delivers the Grafana configuration and provider settings as documented artifacts your team can review and version.
- The written scope can include a test plan covering login, logout, role mapping and denied access.
- Confirms whether single logout through signout_redirect_url is needed, and documents any gap before go-live.
How we support
- Retainers can cover upgrades of Keycloak or authentik and Grafana, and retesting the SSO login after each change.
- Keycloak plans four minor releases a year, so the scope should name who tracks release notes and applies updates.
- Enterprise-only authentik features, such as enhanced audit logging, need a paid subscription, so confirm which features the design depends on.

