Can't use Authentik to log into Grafana #7495
Replies: 3 comments 3 replies
-
I'm getting exactly the same error. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
I hit the same error. This turned out to be that the currently logged in Authentik user did not have an email address assigned to them. In the admin console of Authentik, if you browse to Directory\Users, ensure that your user has an email configured. This is not a required field. Be sure not to just open another tab and test as you'll likely be logged in as your Authenik admin account and perhaps not the user you're attempting to configure for Grafana. It's easiest to open a new private window to test from. Grafana will then attempt to create a user with the same name and email with the username being the email. If you already have a Grafana user of the same name you'll get '"Failed to create user" error="user already exists"' in the Grafana logs. Just putting it out there since that's the next error I hit. Best of luck. |
Beta Was this translation helpful? Give feedback.
-
Sharing my setup here as it is working flawlessly. Maybe it helps some of you to resolve your issues. Env section for grafana in docker-compose.yml:
Note the I'm using Docker Swarm and resp. swarm secrets for injecting the Client Id and Client Secret. In Authentik's Provider settings for Grafana you need to configure the following redirect URL: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to put Authentik in front of Grafana. I have Authentik set up for a few other services and it works great, was no hassle to set up, but for some reason I can't work out why Grafana won't work. After I pass authentication with Authentik, Grafana takes me back to log in page with a message saying "internal server error". I've looked in the Grafana logs and get the following lines:
Any help would be most appreciated! I've followed the steps from the Authentik page on Grafana: https://goauthentik.io/integrations/services/grafana/
Beta Was this translation helpful? Give feedback.
All reactions