Issue while grafana role mapping with keycloak IDP

I am trying to setup Grafana latest with keycloak 19.0.1

I can successful login to grafana over Oauth2.
But there’s problems in that I stuck.

  1. Role Mapping. I have three roles in Keycloak Admin, Editor and Viewer. But GF does not cover this.

The user is always in Viewer role.
And i set the path in .ini file like this

role_attribute_path = contains(roles[], 'admin') && 'Admin' || contains(roles[], 'editor') && 'Editor' || 'Viewer'

Thank you I got the solution by refering this Role mapping keycloak and grafana 9.1.1 not successfull - #2 by rpartapsing