Github OAuth not working

  • What Grafana version and what operating system are you using?
    I am using Grafana Enterprise v8.2.4 (d409b0ca16) installed on Ubuntu

  • What are you trying to achieve?
    Enable GitHub OAuth login for a team

  • How are you trying to achieve it?
    I created a GitHub OAuth App, I got the client ID and secret from GutHub. I created a dedicated team on GitHub and for the team ID. I edited /etc/grafana/grafana.ini as below

#################################### GitHub Auth ##########################
[auth.github]
;enabled = true
;allow_sign_up = true
;client_id = ***
;client_secret = ***
;scopes = user:email,read:org
;auth_url = https://github.com/login/oauth/authorize
;token_url = https://github.com/login/oauth/access_token
;api_url = https://api.github.com/user
;allowed_domains =
;team_ids = ***
;allowed_organizations =

Then I restarted the grafana server

sudo systemctl restart grafana-server
  • What happened?
    Nothing changed

  • What did you expect to happen?
    I expect a github logo to appear on the login page, to allow login using github credentials

  • Can you copy/paste the configuration(s) that you are having problems with?
    … see above

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.When visiting the URL myGrafanaServer/login/github I got a error message “OAuth not enabled”

  • Did you follow any online instructions? If so, what is the URL?
    I followed this doc GitHub OAuth2 Authentication | Grafana documentation
    relatively incomplete… (In addition to this ticket, I made a feedback with some suggestions for the doc)

You need to remove semicolons:


They have comment meaning and commented settings are ignored.

Thanks ! That solve the issue.
I didn’t know semicolon were used as comment markup.

I had a following problem where when I click on the button I get a warning
“Login Failed: Login provider denied login request”

I solved it by editing domain and root_url under the [server] section as mentionend in the doc