Entra ID or Keycloak for Grafana SSO: which fits your team
Choose Microsoft Entra ID when your users and administrators already sign in through a Microsoft tenant and you want Grafana to accept that sign-in through its Entra ID OAuth setup. Choose Keycloak when you want a self-hosted identity server in your own infrastructure, with OpenID Connect and SAML handled in one place, and your team is prepared to run that server, its database and its upgrades. Edition matters for both paths: SAML, team sync and active sync are documented only for Grafana Enterprise and Grafana Cloud, so open source Grafana users should confirm their edition before designing group mapping or SAML sign-in. This section covers only the Grafana integration. The general comparison of the two identity providers is on its own page.
On the Entra ID side, Grafana's Microsoft Entra ID OAuth page walks through the sign-in configuration for an application registered in your tenant. Before you start, confirm with your Microsoft administrator which tenant holds your users and admins, and whether group membership in that tenant should drive Grafana roles. Check the tenant's data location as well. It is mapped from the country or region chosen at tenant creation and cannot be changed afterward, so confirm it matches where your Grafana login data is allowed to be processed. Entra ID licensing sits outside this page, so raise that cost question with Microsoft directly.
On the Keycloak side, Grafana's Keycloak page uses the Generic OAuth section, auth.generic_oauth, with auth_url, token_url and api_url pointing at your Keycloak realm. The page maps Keycloak claims to Grafana's email, login, name, role and groups attributes, and it offers optional single logout through signout_redirect_url. Your work is the Keycloak client, the token claims and the role mapping. Team sync for Keycloak is an Enterprise or Cloud feature, so if you need groups to drive Grafana teams automatically, include that edition in the decision before you build the integration.
What Grafana SSO supports in open source, Enterprise and Cloud
Open source Grafana signs users in with Entra ID or Keycloak through the Generic OAuth provider, configured in the [auth.generic_oauth] section. Grafana documents OAuth 2.0 and OpenID Connect sign-in there, with provider pages for both Microsoft Entra ID and Keycloak. Grafana also documents LDAP authentication and JWT proxy authentication, which are separate routes for teams whose users already sit in a directory or behind an authenticating proxy.
- Entra ID sign-in: Grafana has a dedicated page for Microsoft Entra ID OAuth authentication. Use it as the starting point for app registration and redirect settings in your tenant. Entra ID OAuth page
- Keycloak sign-in: The Keycloak page points
auth_url,token_urlandapi_urlat your realm, then maps claims to email, login, name, role and groups attributes. Keycloak OAuth2 page - Role mapping: The Keycloak page uses
role_attribute_pathto map a claim to a Grafana role. Test it with a test user from each role before you rely on it for access levels. - Single logout: The Keycloak page supports optional single logout through
signout_redirect_url. Confirm how sessions end in your environment during testing. - LDAP and JWT proxy: Both are documented options in open source. Choose them only when a directory or an upstream proxy already handles authentication for your users.
Check the role and group claims in a test realm before go-live, because team sync is not part of open source Grafana, so group claims alone do not set team membership.
Grafana Enterprise and Grafana Cloud add SAML authentication, team sync and active sync, which Grafana documents as unavailable in open source. Grafana's authentication overview also marks SCIM provisioning as supported for SAML and names Entra ID and Okta as the identity providers for it. These features matter when a SAML requirement, group-based team membership or lifecycle provisioning is part of your design.
- SAML authentication: Available only in Grafana Enterprise and Grafana Cloud. Choose this route when your policy requires SAML sign-in to Grafana itself.
- Team sync: Maps identity provider groups to Grafana teams. Grafana marks team sync for Keycloak as available in Enterprise and Cloud, so a Keycloak group path also needs one of these editions.
- Active sync: Keeps Grafana's view of users and group membership aligned with the identity provider after sign-in. Confirm the update frequency and which attributes it changes for your provider.
- SCIM provisioning with SAML: Grafana names Entra ID and Okta for this path. Keycloak is not named for it in Grafana's documentation, so confirm before you plan around it.
Confirm each enterprise feature by name with Grafana for the edition and version you buy, and ask how each edition meets your hosting and data residency rules.
A few questions sit between the editions and the two identity providers, and Grafana's documentation does not answer them directly. Treat each one as an open item for Grafana, the identity provider vendor or your own test environment, not as a settled capability.
- Keycloak SAML into Grafana: Keycloak is a SAML 2.0 server, but Grafana does not name Keycloak for its SCIM path with SAML. Ask Grafana whether Keycloak can act as the SAML identity provider for your edition before you plan around it.
- Keycloak SCIM API: Keycloak documents a SCIM API that provisions users into Keycloak. It does not provision users into Grafana, so it does not by itself give Grafana SCIM provisioning.
- Group claims for team sync: Confirm which group claim your Keycloak realm or Entra ID tenant sends, and how Grafana maps it to teams. Test with a sample user and a sample group.
- Entra ID group behavior: Confirm how group claims are emitted for your tenant's group count and configuration, and what Grafana does when a claim is incomplete. Ask Microsoft and Grafana for written answers.
- Edition scope: Confirm each feature by name and version with Grafana before it appears in a design or procurement requirement.
Get these answers in writing from Grafana and your identity provider vendor before you choose the edition and provider together, since that pairing decides which features you can use.
How Entra ID and Keycloak compare for Grafana SSO
This table compares how Microsoft Entra ID and Keycloak connect to Grafana, from sign-in method and claim mapping to provisioning, data location and licensing. Read each row against your Grafana edition, because team sync and SAML require Grafana Enterprise or Grafana Cloud. The main takeaway: Keycloak's sign-in, role mapping and logout settings are covered in Grafana's guide for open-source Grafana, while Entra ID's role mapping and logout behavior need confirmation in your own tenant.
| Integration aspect | Microsoft Entra ID | Keycloak |
|---|---|---|
| Grafana sign-in page used | Dedicated Entra ID OAuth page in Grafana's docs | Keycloak OAuth2 page, using the Generic OAuth provider |
| Protocols with Grafana | OAuth 2.0 and OIDC in open source; SAML on Enterprise or Cloud only | OAuth 2.0 and OIDC in open source; SAML on Enterprise or Cloud only |
| Role and group claim mapping | Not covered in this comparison; confirm the role and group claim mapping in your tenant before build | Documented: role_attribute_path for roles and the groups attribute |
| Team sync | Enterprise and Cloud only | Enterprise and Cloud only |
| SCIM provisioning | Documented with SAML; Grafana Enterprise or Cloud only | No Keycloak-to-Grafana SCIM path documented; Keycloak's SCIM API provisions users into Keycloak |
| Single logout | Confirm against Grafana's Entra ID page before planning | Optional, configured through signout_redirect_url |
| Data location | Tenant location fixed at creation; MFA data in North America and/or tenant geo | Runs wherever you deploy it, including your own data center or cloud account |
| Licensing | Entra ID Free ships with Microsoft cloud subscriptions; P1 from $7.00 and P2 from $10.00 per user per month with annual commitment (Microsoft Entra pricing page) | Apache-2.0 open source; you pay for your own hosting and operations |
| Current release | Managed by Microsoft; no version for you to pin or upgrade | 26.8.1, released October 13, 2026 |
How the Grafana login flow runs through the identity provider
The flow starts when a user opens Grafana, which redirects the browser to the identity provider's sign in endpoint. After the user signs in, the provider sends an authorization code back to Grafana's callback. Grafana then exchanges that code at the token endpoint for tokens and reads the email, login, name, role and groups claims before it creates the session. Check that the claim names and endpoints match your provider's Grafana page, and confirm which claim carries the role, because that value controls what each user can do in Grafana. This is a generic OIDC illustration, so verify the exact configuration against the provider's documentation.
Authorization code flow between the user, Grafana and the identity provider.
How to set up Grafana SSO with Entra ID or Keycloak
Grafana's Microsoft Entra ID OAuth page is the starting point for this setup. The app registration and its redirect settings are created in your own Entra tenant, so the administrators of that tenant need to be involved from the first step. The exact registration steps, role mapping and any SAML route must be confirmed on Grafana's page and in your tenant before the work is scoped.
- Tenant ownership: The app registration lives in the client's tenant, so the tenant owner should approve the redirect URIs and the public Grafana hostname before anything is configured.
- Redirect settings: Redirect URLs must match the Grafana address that users open in the browser. Copy the values from Grafana's page for the version you run, and do not reuse values from a test environment.
- Role mapping: Confirm how Entra roles or groups map to Grafana roles on Grafana's page. Agree the mapping with the application owner before any user is assigned access.
- SAML route: Grafana documents SAML, team sync and active sync as available only in Grafana Enterprise and Grafana Cloud, and lists Entra ID among the identity providers for SCIM provisioning with SAML. Confirm your license tier before you plan a SAML route.
- Tenant location: An Entra tenant's data location is set from the country or region chosen at creation and cannot be changed afterward, so check it against your data residency requirements before the tenant is used.
Confirm the registration steps against Grafana's current page, and have your tenant administrator review the app registration against your own identity policies before go-live.
On the Keycloak side, you create the client in a realm by following Keycloak's Server Administration Guide. On the Grafana side, the [auth.generic_oauth] section takes auth_url, token_url and api_url, each pointing at Keycloak, and Grafana's Keycloak page documents every key. Realm names, client settings and Grafana keys must agree, because a mismatch in any one of them stops sign-in.
- Realm and client: Create the client in the realm your users sign in to, following the Server Administration Guide, and record the client ID and any client secret for the Grafana configuration.
- Endpoints:
auth_url,token_urlandapi_urleach include the realm path. Check all three against the endpoints Keycloak publishes for that realm, load theauth_urlin a browser, and only then restart Grafana. - Claim mapping: Map
email,login,name,role_attribute_pathandgroupsfrom the claims your Keycloak client emits. Confirm each claim name in a test token, because Grafana reads what the token actually contains. - Role and team sync:
role_attribute_pathdecides each user's Grafana role, so agree the role claim with the application owner before users sign in. Grafana marks team sync for Keycloak as available only in Grafana Enterprise and Grafana Cloud. - Optional logout:
signout_redirect_urlis optional. Set it only if you want users sent to a specific page after sign-out, and confirm the resulting behavior on Grafana's Keycloak page before go-live.
Test sign-in and sign-out with one user per role, then keep the realm settings, claim names and Grafana configuration in change control so reviewers can trace each role.
What Grafana SSO provisions for Entra ID and Keycloak
Grafana splits identity work into sign-in, group mapping, provisioning and offboarding, and its documented support differs across those steps for Microsoft Entra ID and Keycloak. Read each card as a separate check, because a working login does not prove that team membership or account removal will behave the same way. The Grafana edition you run decides which of these features you can use at all.
Sign-in and attribute mapping
Both providers sign users in with OAuth 2.0 or OpenID Connect, and Grafana has a provider page for each. Grafana's Keycloak page maps Keycloak claims to the email, login, name, role (through role_attribute_path) and groups attributes, so the documented claim mapping is clear on that side. For Microsoft Entra ID, confirm on Grafana's Entra page which token claims fill those same attributes and how roles are derived, before you test with production users.
Group and team sync
Team sync maps identity provider groups to Grafana teams. Grafana documents team sync for Keycloak as Enterprise and Cloud only, so open source Grafana cannot run it and a team that depends on group-based access needs that edition before it designs the mapping. For Entra ID, do not assume the group path. Confirm which claim carries group membership, whether it arrives in the token, and whether it appears as names or identifiers, before you write role rules that depend on it.
Grafana authentication overviewSCIM provisioning into Grafana
Grafana names Entra ID and Okta as the identity providers supported for SCIM provisioning, and that path works with SAML on SAML on Enterprise or Cloud editions. An Entra ID tenant can therefore provision into Grafana only after you choose SAML and an eligible edition. Keycloak's SCIM API lets external systems provision users into Keycloak itself, but Grafana's documentation does not describe it as a path into Grafana, so confirm that with Grafana before you plan a Keycloak-to-Grafana provisioning flow.
Keycloak admin guideDeprovisioning and session end
Offboarding has to end Grafana access when a person leaves, and the two providers reach that outcome by different routes. Keycloak's Grafana page documents optional single logout through signout_redirect_url, so confirm whether your deployment sets it and what happens to sessions that are already open. For Entra ID, confirm how disabling or deleting a user affects open Grafana sessions, and whether the Enterprise SCIM path removes or deactivates the Grafana user. Test both with a disabled test account before you rely on either.
Documented limits to check before you commit
Start with the Grafana edition, because it decides which identity features you can use. Grafana's documentation places SAML authentication, team sync and active sync in Grafana Enterprise and Grafana Cloud, and it lists SCIM provisioning alongside SAML, with Entra ID and Okta as the named providers. Open source Grafana cannot use any of these. On an open source deployment, both Entra ID and Keycloak sign in through the Generic OAuth provider (auth.generic_oauth), so role and group mapping has to come from token claims, and team membership has to be managed outside Grafana's sync features. If you need SCIM or team sync, settle the edition first, because that choice changes licensing before any identity design starts.
The Keycloak SCIM API is documented as a way for external systems to provision users into Keycloak. It is not documented as a provisioning path into Grafana, so treat Keycloak as the identity source and plan for Grafana user records to appear through sign-in. On residency, an Entra ID tenant's data location is mapped from the country or region chosen at creation and cannot be changed afterward. Entra multifactor authentication data is stored in North America and/or the tenant's geo-location. Record the tenant location as a permanent decision in your residency file, and treat MFA data location as a separate question from where Grafana runs. Check the wording against Microsoft's data residency guidance before the tenant is created.
Before you commit, confirm three points in writing with Grafana and Microsoft. First, confirm how Entra ID group claims reach Grafana's role_attribute_path and groups attributes in your tenant, including the claim format your app registration will emit. Grafana's Keycloak page shows the mapping, but you need the Entra ID equivalent. Second, confirm how Entra ID single logout works with signout_redirect_url, because Grafana documents that setting for Keycloak and you must verify the behavior for Entra ID yourself. Third, confirm whether any SAML path from Keycloak into open source Grafana exists, since SAML is documented only for the enterprise and cloud editions. Get these answers before you scope the work, because each one can change the setup effort.
Questions to ask before hiring help for Grafana SSO
How much work is Microsoft Entra ID or Keycloak SSO for Grafana?
The effort depends mostly on four things: the Grafana edition, the number of Grafana instances that need sign-in, the role and group design, and whether new application registrations or clients must be created on the Entra ID or Keycloak side. A single open source Grafana instance with a short list of groups is the smallest version of the job. Each extra instance repeats the redirect settings, client secret and role mapping. SAML, team sync and active sync are available only in Grafana Enterprise and Grafana Cloud, so the edition decision changes which steps apply at all. Ask for an estimate that lists each instance, each app registration or client, and each group mapped to a Grafana role, because those lines are what move the hours up or down.
What does our own team need to provide for Grafana SSO?
You need Microsoft Entra ID tenant administrators, Keycloak realm administrators if Keycloak is the identity provider, a Grafana edition decision, and one named owner for role mapping. The work cannot start without these inputs.
- Entra ID tenant administrators to register the application, set redirect URIs, issue a client secret and assign users or groups.
- Keycloak realm administrators to create the client, configure claim mappers for email, login, name, role and groups, and confirm group membership.
- A Grafana edition decision, because SAML, team sync and active sync are available only in Grafana Enterprise and Grafana Cloud.
- A named owner for role mapping who decides which group becomes a Viewer, Editor or Admin and signs off on every change.
Without that owner, role mapping tends to drift as groups change. Confirm administrator access in writing before the scope is agreed.
Can our own team set up Grafana SSO without outside help?
Often yes for the basic sign-in, and the documentation supports that path. Grafana publishes a setup page for Microsoft Entra ID and another for Keycloak, so a team with an administrator on each identity side can usually get a first login working by following those steps. Teams more often ask for outside review at claim mapping and testing. Claim mapping decides which users receive which Grafana role, and a mistake there can grant too much or too little access without any visible login error. Testing should cover users in each group, users in no group, removed users and logout behavior. Ask whether the scope includes an independent review of the role mapping before go-live and whether a retest is a written deliverable.
What does Entra ID and Keycloak SSO for Grafana cost?
The license costs differ in kind. Microsoft Entra ID Free is included with Microsoft cloud subscriptions such as Azure and Microsoft 365, and covers MFA and SSO to SaaS apps. Microsoft's Entra pricing page lists Entra ID P1 from $7.00 per user per month and P2 from $10.00 per user per month, both with annual commitment, and P1 is included in some Microsoft 365 plans. Keycloak is licensed under Apache-2.0, so the server itself carries no license fee, but you pay for hosting, a production database and the staff time to run and upgrade it. Grafana Enterprise is needed for SAML, team sync and active sync, and its pricing must be confirmed with Grafana directly. Ask any vendor or partner to separate one-time setup costs from recurring license and hosting costs.
How is a DeployOpen quote for Grafana SSO formed?
A quote follows from the written scope. DeployOpen does not publish a price list, so there is no rate card to check against. Most engagements are fixed-scope, meaning the scope, deliverables and timelines are agreed in writing before work starts. To make quotes comparable, specify the identity provider side (Entra ID, Keycloak or both), the number of Grafana instances, the Grafana edition, the number of role mappings and groups, whether new app registrations or clients are created, the testing you want and whether you need a retest. Ongoing support, upgrades and continuous testing are available as retainers, which is a separate arrangement from the initial scope. Ask for the deliverables list in writing before you compare quotes from any provider.
What breaks Grafana SSO after go-live, and who fixes it?
Most failures after launch come from changes on the identity side: a rotated client secret, a renamed group or a changed claim name. Keycloak plans four minor releases a year, so the upgrade calendar needs an owner too. Grafana's Keycloak page documents optional single logout through signout_redirect_url, so logout behavior needs its own test case. Before you sign, ask who owns client secret rotation, group changes and identity provider upgrades. The answer might be your team, a DeployOpen retainer for ongoing support, upgrades and continuous testing, or a split of those duties. Put that split in the written scope so nobody discovers it during an outage.
How DeployOpen sets up Grafana SSO with either provider
DeployOpen scopes the Grafana sign-in path for your provider first, then builds, tests and documents it inside your own infrastructure. Entra ID uses Grafana's Microsoft Entra ID OAuth setup, while Keycloak uses the Generic OAuth provider, so the scope names which path applies and which Grafana edition your team needs for SAML, team sync or active sync. Every engagement is fixed-scope, with the scope agreed in writing before work starts.
How we scope
- The written scope names the Grafana edition, because SAML, team sync and active sync need Grafana Enterprise or Grafana Cloud.
- It records the provider path, Entra ID OAuth or Keycloak through Generic OAuth, and the callback URLs.
- Engagements are fixed-scope, and ongoing support is available as a retainer after handover.
How we build
- We configure Grafana's auth settings for your provider, mapping identity claims to Grafana attributes such as email, login, name, role and groups.
- Keycloak builds include the realm, client, role mappers and a relational database, since the dev-file store is unsuitable for production.
- Entra builds cover the app registration, redirect URIs, group claims and the tenant, whose data location is fixed at creation.
How we hand over
- Handover covers a written configuration record, the login test steps and the Grafana role mapping your admins will maintain.
- Deliverables document where team sync or SCIM options depend on the edition you license, so admins know the limits.
- Your identity and security teams keep the configuration and records inside your own environment after handover.
How we support
- Retainers cover upgrades, patching and continuous testing for Grafana and the chosen identity provider.
- Keycloak plans four minor releases a year, so name the release line you track in the retainer scope.
- Confirm with your Entra administrator the license tier and tenant settings before the scope is signed.

