Can't get role_attributes_path to work

I have the following contents in my grafana.ini:

[auth.github]
allow_sign_up = true
allowed_organizations = […]
api_url = https://api.github.com/user
auth_url = https://github.com/login/oauth/authorize
auto_login = true
client_id = $__file{/etc/secrets/auth_github_oauth/client_id}
client_secret = $__file{/etc/secrets/auth_github_oauth/client_secret}
enabled = true
role_attributes_path = 'GrafanaAdmin'
scopes = user:email,read:org
team_ids = …
token_url = https://github.com/login/oauth/access_token

As you can see, I did use an JMESPath expression which does just evaulate to GrafanaAdmin. When logging into Grafana, I always only see myself assigned the Viewer role in my profile. Am I missing some configuration?

You are missimg at least:
allow_assign_grafana_admin=true

Shouldn’t it, according to the docs, in that case at least assign me “Admin” role? I also tried the Admin and Editor string, which both did nothing.

No, you requested GrafanaAdmin in your JMESpath. GrafanaAdmin != Admin - those are 2 different roles. GrafanaAdmin is “super admin” - more powerful admin role than Admin role, so there is also special config allow_assign_grafana_admin for that.
I said at least, so there can million other problems - use standard approach - debug logs.