Does Grafana support custom scopes with okta integration?

SSO with okta works smooth with standard scopes - openid, email, profile.

I would like to add a custom scope in okta. The new scope item generates the error
First request looks like this


Any pointers or documentation on this aspect please?


Would this be a valid okta configuration? Couldn’t find any good example for this.

name = Okta
enabled = true
allow_sign_up = true
client_id = {myoktaclientid}
client_secret = {myoktaclientsecret}
scopes = openid profile email myscope
auth_url = https://{mydomain}
token_url = https://{mydomain}
#api_url = https://{mydomain}
api_url = https://{mydomain}{authserverid}/.well-known/oauth-authorization-server?client_id={myoktaclientid}

Grafana doesn’t seem to work with custom scopes. Tried this with OKTA and doesn’t work. I seem to get the token back from okta but JMESPath expressions result in issues resulting in

Invalid type for: , expected: []jmespath.jpType{“array”, “string”}"
t=2021-05-13T17:10:29+0000 lvl=dbug msg=“OAuthLogin got user info” logger=oauth userInfo="&{Id:00ujq59ewmc5rCao40h7 Name:Alpha Charlie Company: Role: Groups:[]}"
t=2021-05-13T17:10:29+0000 lvl=dbug msg=“Building external user info from OAuth user info” logger=oauth
t=2021-05-13T17:10:29+0000 lvl=dbug msg=“Syncing Grafana user with corresponding OAuth profile” logger=oauth