MetricSign
Start free
Low severityauthentication

Power BI Error:
AADSTS90051, invalid national cloud identifier

What does this error mean?

The authentication request specified a national cloud identifier that Azure AD (Entra ID) does not recognize.

Common causes

  • 1Misspelled or invalid `instance` / authority URL in MSAL or ADAL config (e.g. `login.microsoftonline.us` typo, or unsupported value passed to `AzureCloudInstance`)
  • 2App configured for the wrong national cloud — tenant lives in Azure Public but client targets US Government (`login.microsoftonline.us`) or China (`login.partner.microsoftonline.cn`), or vice versa
  • 3Hardcoded legacy cloud identifier (e.g. Azure Germany `login.microsoftonline.de`, which has been retired)
  • 4Custom connector / Power BI gateway / ADF linked service using a stale or non-standard authority URL after a tenant cloud migration
  • 5Programmatic token request passing an unknown enum value for the cloud instance to the MSAL library

How to fix it

  1. 1Identify which national cloud your tenant actually lives in — check the Entra ID portal URL and compare against Microsoft's list (Public: `login.microsoftonline.com`, US Gov: `login.microsoftonline.us`, China 21Vianet: `login.partner.microsoftonline.cn`).
  2. 2In your app's auth config (MSAL/ADAL, app registration, or Power BI/ADF connection), set the authority/instance to the exact endpoint of that cloud — no typos, no trailing slashes that the SDK doesn't expect.
  3. 3If you use the MSAL `AzureCloudInstance` enum, replace any custom string with the official enum value (`AzurePublic`, `AzureUsGovernment`, `AzureChina`); remove any reference to the retired `AzureGermany`.
  4. 4For Power BI gateways, ADF linked services, or Fabric connections, recreate the connection after correcting the cloud — cached authority values often persist until the connection is re-authenticated.
  5. 5Test the fix by reproducing the sign-in flow; AADSTS90051 should disappear immediately once the authority resolves to a valid cloud.

Frequently asked questions

What does AADSTS90051 mean?

The national cloud identifier

How do I fix this error?

Check your application registration, token configuration, and user permissions in the Azure portal. Review Conditional Access policies if the error is policy-related.

Source · learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes#aadsts-error-codes

Other authentication errors