Status Update: Investigation into the recurring "Unauthorized" pop-up identified a probable cause in the Grafana configuration. The grafana.ini [auth] section contains: login_maximum_lifetime_duration = 1m In Grafana, a lowercase m means minutes , not months. This caps the maximum session lifetime at one minute, which matches the reported 30-second to 2-minute cycle of the "Unauthorized" pop-up and forced refresh. The Grafana default for this setting is 30d . A secondary contributing factor is under review: whether Grafana is configured to use the Keycloak refresh token ( use_refresh_token ). Without it, Grafana cannot silently renew an expired access token, so the browser receives a 401 when Keycloak's access token lifespan elapses. Keycloak's default access token lifespan is 5 minutes, which could produce the same symptom at a different interval. While troubleshooting this ticket, a separate and more severe defect was found: SSO users other than ...
Background Keycloak SSO authentication succeeds, but Grafana then rejects the login with "Login failed / User sync failed." Grafana receives a valid token and fails while creating the local user record. Root cause: All GTAC LDAP users share one email address. Keycloak allows duplicate emails; Grafana requires them to be unique. The first account claims that email, and every SSO user after that fails to be created. Also found: login_attribute_path = username doesn't match Keycloak's actual claim ( preferred_username ), so Grafana falls back to email as the username too. We have no access to the GTAC LDAP interface, so the fix is limited to Keycloak and Grafana config. No LDAP or Keycloak email addresses change. Environment: Grafana 10.4.11.13 | Keycloak 10.4.11.12:8444, realm databridge-web-service , client grafana | Generic OAuth Reproduce: Authenticate to Keycloak → open Grafana → click "Sign in with DataBridge SSO" → "User sync failed....