fairfax Availability tablesEndpoints Sign-in errorsGitHubPyPI

fairfax / Sign-in errors / AADSTS50049

AADSTS50049: NoSuchInstanceForDiscovery

The authority your app was given isn't a known Microsoft Entra instance, often a typo in the sign-in host or a host from the wrong cloud.

How to fix it

Use the sign-in host for your tenant's cloud exactly as Microsoft lists it.

Your tenant or subscriptionSign-in host
Commercial Microsoft 365 and Azure, and GCC tenantslogin.microsoftonline.com
GCC High and DoD tenants, and Azure Governmentlogin.microsoftonline.us

Note: Microsoft's row for this code doesn't mention clouds. The cause above is the common one in US government setups, so check it against yours.

What Microsoft says

“AADSTS50049 | NoSuchInstanceForDiscovery - Unknown or invalid instance.”

Source: Microsoft Entra authentication and authorization error codes, page updated 2026-06-15, checked 2026-10-12.

Decode it from the command line

pip install fairfax
fairfax explain AADSTS50049 --tenant gcchigh      # or paste the whole error message

To find the commercial sign-in host in your code before it fails, run fairfax scan src/ --tenant gcchigh --azure government.

Other cross-cloud sign-in errors