Azure AD auth is not working . Err : User Sync Fail

  • What Grafana version and what operating system are you using? 11.3

  • What are you trying to achieve?
    Azure AD login to Grafana hosted on a aAzure VM

  • How are you trying to achieve it?
    Azure Ad Auth

  • What happened?
    *Followed the documentation , but users are seeing “User Sync Failed” error .

  • What did you expect to happen?
    Login without any issues

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

[auth.azuread]

name = Azure AD

enabled = true

allow_sign_up = true

auto_login = false

client_id =

client_secret =

scopes = openid email profile

auth_url = /login.microsoftonline.com/<>/oauth2/v2.0/authorize

token_url = //login.microsoftonline.com/<>/oauth2/v2.0/token

allowed_domains =

allowed_groups =

allowed_organizations = <>

role_attribute_strict = false

allow_assign_grafana_admin = false

#skip_org_role_sync = true

use_pkce = true

use_refresh_token = false

auto_assign_org_role = Viewer

org_mapping = [“<>:cdo:Admin”, “<>:cdo:Editor”, “*:cdo:Viewer”]