title: Grafana role assignment using Azure AD OAuth
body: <p>I'm trying to assign the Admin role in Grafana for certain user groups using Azure AD OAuth. </p>
  
  <p>I can successfully log in with Azure AD credentials using this documentation: <a href="https://grafana.com/docs/auth/generic-oauth/#set-up-oauth2-with-azure-active-directory" rel="nofollow noreferrer">Set up OAuth2 with Azure Active Directory</a></p>
  
  <p>According to this page I need to include role_attribute_path somewhere: <a href="https://github.com/grafana/grafana/blob/master/docs/sources/auth/generic-oauth.md#role-mapping" rel="nofollow noreferrer">Role mapping</a></p>
  
  <p><code>role_attribute_path = contains(info.groups[*], 'admin') &amp;&amp; 'Admin' || contains(info.groups[*], 'editor') &amp;&amp; 'Editor' || 'Viewer'</code></p>
  
  <p>Has anyone got a working example of role assignment using the Azure AD log in?</p>