# \#keycloak

**URL:** https://community.grafana.com/tag/keycloak/241.md

[Latest](https://community.grafana.com/latest.md) · [Categories](https://community.grafana.com/categories.md) · [Tags](https://community.grafana.com/tags.md)

---

## [Authentication issue (Grafana --OIDC–\> Keycloak --OIDC–\> 3rd-party-IdP)](https://community.grafana.com/t/authentication-issue-grafana-oidc-keycloak-oidc-3rd-party-idp/132759)

<div class="topic-metadata">

**Author:** [@box4dmitry](https://community.grafana.com/u/box4dmitry)\
**Replies:** 5\
**Last updated:** [September 26, 2025, 9:46am UTC](https://community.grafana.com/t/authentication-issue-grafana-oidc-keycloak-oidc-3rd-party-idp/132759 "2025-09-26T09:46:10Z")

</div>

Hello, I’m having troubles with Grafana authentication. My setup is as following: Grafana is configured to allow login with generic OAuth I use Keycloak for identity provider Keycloak is configured to allow login wit…

---

## [How to integrate keycloak with grafana backend API in version 11.5](https://community.grafana.com/t/how-to-integrate-keycloak-with-grafana-backend-api-in-version-11-5/147247)

<div class="topic-metadata">

**Author:** [@goelvicky](https://community.grafana.com/u/goelvicky)\
**Replies:** 15\
**Last updated:** [April 4, 2025, 8:38am UTC](https://community.grafana.com/t/how-to-integrate-keycloak-with-grafana-backend-api-in-version-11-5/147247 "2025-04-04T08:38:26Z")

</div>

Hello Grafana Community, I have integrated Keycloak with Grafana, and I am able to login in grafana using keycloak flow from browser. But when I used the Basic auth to fetch/create the service account it failed as inste…

---

## [Grafana can\`t see roles from keycloak](https://community.grafana.com/t/grafana-can-t-see-roles-from-keycloak/146845)

<div class="topic-metadata">

**Author:** [@antonpostrest](https://community.grafana.com/u/antonpostrest)\
**Replies:** 1\
**Last updated:** [March 21, 2025, 1:04pm UTC](https://community.grafana.com/t/grafana-can-t-see-roles-from-keycloak/146845 "2025-03-21T13:04:19Z")

</div>

Hello! I try to setup grafana authorization via keycloak. Grafana can see users, but canr parse their roles. In grafana console I can see that keycloak sent a roles to grafana in few places, but Grafana cant parse it: g…

---

## [OAuth: Failed to get token from provider](https://community.grafana.com/t/oauth-failed-to-get-token-from-provider/145880)

<div class="topic-metadata">

**Author:** [@jmgs2007](https://community.grafana.com/u/jmgs2007)\
**Replies:** 1\
**Last updated:** [March 8, 2025, 9:24pm UTC](https://community.grafana.com/t/oauth-failed-to-get-token-from-provider/145880 "2025-03-08T21:24:12Z")

</div>

Hello Team, I’m exploring integration between Grafana and Keycloak , I’m using windows 11 with docker , Grafana and keycloak are two containers , after configure , I’m getting this error, “Login failed Failed to get tok…

---

## [Generic OAuth (open source edition): unable to retrieve attribute to map with organisation](https://community.grafana.com/t/generic-oauth-open-source-edition-unable-to-retrieve-attribute-to-map-with-organisation/140837)

<div class="topic-metadata">

**Author:** [@tipsy](https://community.grafana.com/u/tipsy)\
**Replies:** 0\
**Last updated:** [January 21, 2025, 3:20pm UTC](https://community.grafana.com/t/generic-oauth-open-source-edition-unable-to-retrieve-attribute-to-map-with-organisation/140837 "2025-01-21T15:20:34Z")

</div>

What Grafana version and what operating system are you using? Grafana v11.4.0 (b58701869e) on Rocky 8.10 What are you trying to achieve? We want to switch the auth from ldap to generic sso (keycloak). We’re using …

---

## [Do changes online also update the config file?](https://community.grafana.com/t/do-changes-online-also-update-the-config-file/140755)

<div class="topic-metadata">

**Author:** [@belafelgentraeger](https://community.grafana.com/u/belafelgentraeger)\
**Replies:** 5\
**Last updated:** [January 20, 2025, 2:50pm UTC](https://community.grafana.com/t/do-changes-online-also-update-the-config-file/140755 "2025-01-20T14:50:46Z")

</div>

Hi, I am currently setting up a single sing on in grafana with keycloak but by mistake I enabled auto login and i cant login normaly anymore. I was trying to disable auto login in the configuration file, but it hasn’t up…

---

## [SAML - Grafana role with IDP group linking](https://community.grafana.com/t/saml-grafana-role-with-idp-group-linking/138829)

<div class="topic-metadata">

**Author:** [@sushi121123](https://community.grafana.com/u/sushi121123)\
**Replies:** 5\
**Last updated:** [December 24, 2024, 3:02pm UTC](https://community.grafana.com/t/saml-grafana-role-with-idp-group-linking/138829 "2024-12-24T15:02:06Z")

</div>

Deleting post due to their being no answer

---

## [Grafana role mapping for Keycloak SAML auth](https://community.grafana.com/t/grafana-role-mapping-for-keycloak-saml-auth/135301)

<div class="topic-metadata">

**Author:** [@sushi121123](https://community.grafana.com/u/sushi121123)\
**Replies:** 10\
**Last updated:** [October 30, 2024, 3:34pm UTC](https://community.grafana.com/t/grafana-role-mapping-for-keycloak-saml-auth/135301 "2024-10-30T15:34:29Z")

</div>

I currently have my keycloak configured for SAML on grafana. i have logs of me having a session with grafana saying i did authenticate but i keep going to the log in screen. Im using Linux, and using version 11.1.0 Cur…

---

## [Grafana and Keycloak OAuth. Code not valid, already used for session](https://community.grafana.com/t/grafana-and-keycloak-oauth-code-not-valid-already-used-for-session/133538)

<div class="topic-metadata">

**Author:** [@pantmal](https://community.grafana.com/u/pantmal)\
**Replies:** 5\
**Last updated:** [October 17, 2024, 6:19am UTC](https://community.grafana.com/t/grafana-and-keycloak-oauth-code-not-valid-already-used-for-session/133538 "2024-10-17T06:19:33Z")

</div>

Hello everyone. I am trying to set up OAuth for Grafana with Keycloak. I have followed the required steps but after performing a login, I am receiving a ‘Failed to get token from provider’ message on the Grafana login pa…

---

## [Grafana with Keycloak, Error: Login failed Failed to get token from provider](https://community.grafana.com/t/grafana-with-keycloak-error-login-failed-failed-to-get-token-from-provider/119692)

<div class="topic-metadata">

**Author:** [@i5js](https://community.grafana.com/u/i5js)\
**Replies:** 24\
**Last updated:** [July 22, 2024, 8:04pm UTC](https://community.grafana.com/t/grafana-with-keycloak-error-login-failed-failed-to-get-token-from-provider/119692 "2024-07-22T20:04:44Z")

</div>

Hello all, After googling a lot, and tried a lot of “fixes” I also found, I have decided to create an account and ask for help, because I’m running out of ideas. I’m getting the error message: Error: Login failed Failed…

---

## [Grafana error login.OAuthLogin(get info from generic\_oauth)](https://community.grafana.com/t/grafana-error-login-oauthlogin-get-info-from-generic-oauth/123785)

<div class="topic-metadata">

**Author:** [@momoblues13](https://community.grafana.com/u/momoblues13)\
**Replies:** 6\
**Last updated:** [June 17, 2024, 12:57pm UTC](https://community.grafana.com/t/grafana-error-login-oauthlogin-get-info-from-generic-oauth/123785 "2024-06-17T12:57:49Z")

</div>

After login with keyclock auth this error pops up grafana.ini: auth.generic\_oauth: enabled: true tls\_skip\_verify\_insecure: true name: Keycloak-OAuth allow\_sign\_up: true client\_id: g…

---

## [Grafana keycloak authentication Error](https://community.grafana.com/t/grafana-keycloak-authentication-error/123722)

<div class="topic-metadata">

**Author:** [@momoblues13](https://community.grafana.com/u/momoblues13)\
**Replies:** 4\
**Last updated:** [June 11, 2024, 1:50pm UTC](https://community.grafana.com/t/grafana-keycloak-authentication-error/123722 "2024-06-11T13:50:19Z")

</div>

Regarding grafana integration with Keycloak OAuth2. Currently facing an issue where after the login page of keylock and the credential are put it login redirects to grafana website with port 3000. This is the error This…

---

## [Grafana Oauth Issue with Keycloak "idP did not return a role attribute"](https://community.grafana.com/t/grafana-oauth-issue-with-keycloak-idp-did-not-return-a-role-attribute/123325)

<div class="topic-metadata">

**Author:** [@johnsonaprabu](https://community.grafana.com/u/johnsonaprabu)\
**Replies:** 7\
**Last updated:** [June 6, 2024, 5:54pm UTC](https://community.grafana.com/t/grafana-oauth-issue-with-keycloak-idp-did-not-return-a-role-attribute/123325 "2024-06-06T17:54:01Z")

</div>

What Grafana version and what operating system are you using? 10.4.1 What are you trying to achieve? Trying to authenticate using Keycloak 20 How are you trying to achieve it? Trough GENERIC\_OAUTH What happ…

---

## [Issue with Role Mapping in Grafana OAuth Configuration with Keycloak](https://community.grafana.com/t/issue-with-role-mapping-in-grafana-oauth-configuration-with-keycloak/89139)

<div class="topic-metadata">

**Author:** [@zap](https://community.grafana.com/u/zap)\
**Replies:** 3\
**Last updated:** [June 5, 2024, 3:24pm UTC](https://community.grafana.com/t/issue-with-role-mapping-in-grafana-oauth-configuration-with-keycloak/89139 "2024-06-05T15:24:17Z")

</div>

Hello, I am currently working on setting up OAuth in Grafana (version 9.5.2) using Keycloak as the OAuth provider. While I’ve managed to get the OAuth connection functioning correctly, I am encountering an issue with ro…

---

## [Getting "no refresh token available" even when the token is provided by the IDP](https://community.grafana.com/t/getting-no-refresh-token-available-even-when-the-token-is-provided-by-the-idp/109944)

<div class="topic-metadata">

**Author:** [@cossth](https://community.grafana.com/u/cossth)\
**Replies:** 4\
**Last updated:** [December 14, 2023, 9:37am UTC](https://community.grafana.com/t/getting-no-refresh-token-available-even-when-the-token-is-provided-by-the-idp/109944 "2023-12-14T09:37:04Z")

</div>

What Grafana version and what operating system are you using? Grafana version: 10.2 OS: Kubernetes on Ubuntu What are you trying to achieve? When a user logs out then user should logout without confirmation using…

---

## [Grafana Integration with Keycloak, Error: Login failed Failed to get token from provider](https://community.grafana.com/t/grafana-integration-with-keycloak-error-login-failed-failed-to-get-token-from-provider/106088)

<div class="topic-metadata">

**Author:** [@learnpython47](https://community.grafana.com/u/learnpython47)\
**Replies:** 5\
**Last updated:** [October 21, 2023, 10:34am UTC](https://community.grafana.com/t/grafana-integration-with-keycloak-error-login-failed-failed-to-get-token-from-provider/106088 "2023-10-21T10:34:52Z")

</div>

Hi , I am trying to integrate Keyclock with Grafana for SSO. below is my configuration in grafana.ini file: \[auth.generic\_oauth\] enabled = true name = Keycloak-OAuth allow\_sign\_up = true tls\_skip\_verify\_insecure = true…

---

## [Grafana Keycloak Role Mapping](https://community.grafana.com/t/grafana-keycloak-role-mapping/41191)

<div class="topic-metadata">

**Author:** [@suikast42](https://community.grafana.com/u/suikast42)\
**Replies:** 4\
**Last updated:** [August 29, 2023, 5:57pm UTC](https://community.grafana.com/t/grafana-keycloak-role-mapping/41191 "2023-08-29T17:57:54Z")

</div>

Hi guys, happy new year by the way. I am trying to setup GF 7.3.4 with keycloak 12.0.1 I can successful login to GF over Oauth2. But there’s two problems in that I stuck. Role Mapping. I have three roles in Keycloa…

---

## [Keycloak Oauth check empty users email](https://community.grafana.com/t/keycloak-oauth-check-empty-users-email/82027)

<div class="topic-metadata">

**Author:** [@axelhk](https://community.grafana.com/u/axelhk)\
**Replies:** 2\
**Last updated:** [February 17, 2023, 10:56pm UTC](https://community.grafana.com/t/keycloak-oauth-check-empty-users-email/82027 "2023-02-17T22:56:28Z")

</div>

Grafana 9.1.6 Keycloak 18.0.2 I wonder if there any way in grafana.ini (default.ini) to check if user has an email, and if he doesnt, then make it use username as email. In example like that: \[auth.generic\_oauth\] em…

---

## [Keycloak and grafana don't recive info user role](https://community.grafana.com/t/keycloak-and-grafana-dont-recive-info-user-role/35362)

<div class="topic-metadata">

**Author:** [@satdanielglez](https://community.grafana.com/u/satdanielglez)\
**Replies:** 3\
**Last updated:** [January 6, 2023, 10:19am UTC](https://community.grafana.com/t/keycloak-and-grafana-dont-recive-info-user-role/35362 "2023-01-06T10:19:13Z")

</div>

Hi, I have a problem with grafana and keycloak integration. I have the setting to role attribute path, also I have roles to the user in keycloak, but grafana don’t recive it. Why? contains(roles\[\*\], 'Admin') && 'Admin…

---

## [Grafana - keycloak openid connect integration](https://community.grafana.com/t/grafana-keycloak-openid-connect-integration/76126)

<div class="topic-metadata">

**Author:** [@megarajan](https://community.grafana.com/u/megarajan)\
**Replies:** 2\
**Last updated:** [November 16, 2022, 1:12pm UTC](https://community.grafana.com/t/grafana-keycloak-openid-connect-integration/76126 "2022-11-16T13:12:33Z")

</div>

What Grafana version and what operating system are you using? Version 9.1.5 (commit: df015a9301, branch: HEAD) Ubuntu 18.04.6 LTS What are you trying to achieve? Trying to use keycloak for SSO with grafana. How …
