GitHub OAuth - How to map roles for users?

I have enabled GitHub OAuth and user’s are able to login via GitHub into Grafana. Evertyhing seems to work as expected that everyone are autoassigned to Viewer Role by default.

  • What Grafana version and what operating system are you using?
    Grafana v8.0.5, deployed via Helm Chart.

  • What are you trying to achieve?
    Is it possible to achieve that i.e. GH Organization Admin/Owners will be attached to Admin role in Grafana, and rest of the users will have Editor role by default ? Is it somehow possible ?

  • What happened?
    Authorized user have only Viewer permissions.

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

    auth.github:
      enabled: true
      allow_sign_up: true
      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
      team_ids:
      allowed_organizations: mycompany
      client_id: xxx
      client_secret: xxx