Entra IDDeep dive

AADSTS error codes 90002–90130: the complete list with fixes (part 4 of 5)

Every AADSTS code Microsoft lists from 90002 to 90130: tenant lookup, malformed requests, national clouds, WS-Federation, Graph, consent and endpoint errors, with cause and first check.

Part 4 of my complete AADSTS reference covers every code Microsoft lists from AADSTS90002 to AADSTS90130, in the order of Microsoft's table. These 67 codes are mostly about the request itself: the tenant in the URL, missing or malformed parameters, national clouds, WS-Federation, Graph and consent, and the /common and /consumers endpoints. Each row gives the meaning in plain English, the usual cause and the first check.

Codes in this quick reference

  • AADSTS90002 InvalidTenantName: tenant not found (wrong tenant ID, domain or cloud)Sign-in page / app error
  • AADSTS90004 InvalidRequestFormat: the request isn't properly formattedApp error / token response
  • AADSTS90005 InvalidRequestWithMultipleRequirements: identifier and login hint used togetherSign-in page / app error
  • AADSTS90006 ExternalServerRetryableError: the service is temporarily unavailableSign-in page / app error
  • AADSTS90007 InvalidSessionId: the session ID passed can't be parsedSign-in page
  • AADSTS90008 TokenForItselfRequiresGraphPermission: app needs the sign-in and read user profile permissionSign-in page / app error
  • AADSTS90009 TokenForItselfMissingIdenticalAppIdentifier: use the GUID app ID to request a token for itselfApp error / token response
  • AADSTS90010 NotSupported: unable to create the algorithmApp error / token response

+ 52 more codes in the tables below.

How this guide is organized: How to read these codes → Tenant lookup and malformed requests → Directory service, national clouds and throttling → External users and WS-Federation → Graph and consent → Partner apps, parameters, device code and endpoints → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Tenant lookup and malformed requests. 3. Directory service, national clouds and throttling. 4. External users and WS-Federation. 5. Graph and consent. 6. Partner apps, parameters, device code and endpoints. 7. How to verify a fix. Toolbox: AADSTS90002, AADSTS90004, AADSTS90005, App registrations › Endpoints, /organizations.1How to read thesecodes2Tenant lookup andmalformed requests3Directory service,national clouds and…4External users andWS-Federation5Graph and consent6Partner apps,parameters, device…7How to verify a fixTOOLBOXAADSTS90002AADSTS90004AADSTS90005App registrations › Endpoints/organizationsHow this guide is organized: How to read these codes → Tenant lookup and malformed requests → Directory service, national clouds and throttling → External users and WS-Federation → Graph and consent → Partner apps, parameters, device code and endpoints → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Tenant lookup and malformed requests. 3. Directory service, national clouds and throttling. 4. External users and WS-Federation. 5. Graph and consent. 6. Partner apps, parameters, device code and endpoints. 7. How to verify a fix. Toolbox: AADSTS90002, AADSTS90004, AADSTS90005, App registrations › Endpoints, /organizations.1How to read these codes2Tenant lookup and malformed requests3Directory service, national clouds andthrottling4External users and WS-Federation5Graph and consent6Partner apps, parameters, device code andendpoints7How to verify a fixTOOLBOXAADSTS90002AADSTS90004AADSTS90005App registrations › Endpoints/organizations
At a glance: how this guide is organized · 7 sections · 5 key settings and tools

Note: The series: part 1 (16000–50079), part 2 (50085–54005), part 3 (65001–81012), part 4 (this page) and part 5 (120000 and above). The codes admins meet most often are also in the AADSTS quick reference.

How to read these codes#

Diagnosing a request error from 90002 to 90130Step 1: Capture the raw error from the app. Token endpoint JSON or the sign-in page; 90002 can't appear in your sign-in logs Step 2: Read the authority in the URL. A tenant ID or verified domain, or /organizations, /consumers or /common Step 3: Match it to the supported account types. Several codes mean the app picked the wrong authority for its account types Step 4: Check the sign-in host's cloud. National clouds have their own hosts; a tenant signs in only through its own cloud Step 5: Capture the request for malformed errors. Browser developer tools (Network tab, preserve log) or Fiddler1Capture the raw error fromthe appToken endpoint JSON or the sign-inpage; 90002 can't appear in yoursign-in logs2Read the authority in the URLA tenant ID or verified domain, or/organizations, /consumers or/common3Match it to the supportedaccount typesSeveral codes mean the app pickedthe wrong authority for its accounttypes4Check the sign-in host'scloudNational clouds have their ownhosts; a tenant signs in onlythrough its own cloud5Capture the request formalformed errorsBrowser developer tools (Networktab, preserve log) or FiddlerDiagnosing a request error from 90002 to 90130Step 1: Capture the raw error from the app. Token endpoint JSON or the sign-in page; 90002 can't appear in your sign-in logs Step 2: Read the authority in the URL. A tenant ID or verified domain, or /organizations, /consumers or /common Step 3: Match it to the supported account types. Several codes mean the app picked the wrong authority for its account types Step 4: Check the sign-in host's cloud. National clouds have their own hosts; a tenant signs in only through its own cloud Step 5: Capture the request for malformed errors. Browser developer tools (Network tab, preserve log) or Fiddler1Capture the raw error from the appToken endpoint JSON or the sign-in page; 90002 can'tappear in your sign-in logs2Read the authority in the URLA tenant ID or verified domain, or /organizations,/consumers or /common3Match it to the supported account typesSeveral codes mean the app picked the wrong authorityfor its account types4Check the sign-in host's cloudNational clouds have their own hosts; a tenant signs inonly through its own cloud5Capture the request for malformed errorsBrowser developer tools (Network tab, preserve log) orFiddler
Figure 1 · Process Diagnosing a request error from 90002 to 90130. Most of these codes are about the request itself, so start from the app's output and the URL it called, then look the code up below.
  • Who sees them: mostly developers and admins running scripts. The code comes back in the token endpoint's JSON (error, error_codes, error_description, correlation_id) or on the Microsoft sign-in page when a browser carries the bad request. A request that fails before Entra ID knows which tenant it belongs to, such as 90002, can't appear in your sign-in logs, so the app's output is your evidence.
  • Read the authority first. The URL either names a tenant (ID or verified domain) or uses /organizations (work and school accounts), /consumers (personal accounts) or /common (both). Several codes here mean the app picked the wrong one for its supported account types.
  • National clouds have their own sign-in hosts, for example login.microsoftonline.us for Azure Government and login.partner.microsoftonline.cn for Microsoft Azure operated by 21Vianet. A tenant can only sign in through its own cloud.
  • Capture the request with the browser's developer tools (Network tab, preserve log) or an HTTP capture tool such as Fiddler, which Microsoft suggests for malformed-request errors.

To see the raw error from a script, send a token request and print the JSON body:

PowerShell
$body = @{
    client_id     = '<application-id>'
    client_secret = '<secret>'     # prefer a certificate in production
    scope         = 'https://graph.microsoft.com/.default'
    grant_type    = 'client_credentials'
}
try {
    Invoke-RestMethod -Method Post -ContentType 'application/x-www-form-urlencoded' `
        -Uri 'https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token' -Body $body
} catch {
    $_.ErrorDetails.Message | ConvertFrom-Json | Select-Object error, error_codes, error_description
}

Tenant lookup and malformed requests (90002–90027)#

CodeMeaningUsual causeFirst check
AADSTS90002 InvalidTenantNameThe tenant name wasn't foundWrong tenant ID or domain, the wrong cloud, or a tenant guessed from an unregistered email domainTenant in the authority URL. For hybrid join, see the Windows enrollment codes
AADSTS90004 InvalidRequestFormatThe request isn't properly formattedMalformed request from the app or a device in betweenCapture the request and compare it with the protocol docs
AADSTS90005 InvalidRequestWithMultipleRequirementsThe identifier and the login hint can't be used togetherThe app sends bothSend only one of them
AADSTS90006 ExternalServerRetryableErrorThe service is temporarily unavailableTransientRetry with backoff
AADSTS90007 InvalidSessionIdBad request: the session ID can't be parsedDamaged or altered session valueFresh sign-in in a clean browser session
AADSTS90008 TokenForItselfRequiresGraphPermissionNo consent: the app needs at least the "sign in and read user profile" permissionMicrosoft Graph User.Read missing or not consentedAdd User.Read and grant consent
AADSTS90009 TokenForItselfMissingIdenticalAppIdentifierThe app requests a token for itself, which works only when the resource is its GUID app IDResource given as a name or URIUse the client ID (GUID) as the resource
AADSTS90010 NotSupportedUnable to create the algorithmMicrosoft's MSAL.NET docs also show 90010 for a grant type sent to /commonUse /organizations or a tenant-specific authority
AADSTS9001023The grant type isn't supported over the /common or /consumers endpointsAuthority set to a global endpoint for this flowUse /organizations or the tenant-specific endpoint
AADSTS90012 RequestTimeoutThe requests have timed outNetwork or proxy delay, or a service problemRetry; check the proxy path
AADSTS90013 InvalidUserInputThe user's input isn't validBad value typed on the pageRe-enter the value
AADSTS90014 MissingRequiredFieldAn expected field is missing from the credentialIncomplete request from the appRequired fields for the flow
AADSTS900144The request body must contain the parameter named in the messageParameter missing, or the body isn't form-encodedSend the body as application/x-www-form-urlencoded
AADSTS90015 QueryStringTooLongThe query string is too longOversized parameters in the URLWhat the app puts in state, scope and other parameters
AADSTS90016 MissingRequiredClaimThe access token isn't valid: a required claim is missingToken from the wrong flow or for another audienceDecode the token (for example at jwt.ms) and compare claims
AADSTS90019 MissingTenantRealmEntra ID can't work out the tenant from the requestGlobal endpoint with nothing that identifies the tenantUse a tenant-specific authority
AADSTS90020The SAML 1.1 assertion is missing the user's ImmutableIDThe federation server doesn't issue the ImmutableID claimClaim rules on the federation server (AD FS or third party)
AADSTS90022 AuthenticatedInvalidPrincipalNameFormatThe principal name isn't in the expected name[/host][@realm] formatMalformed principal name from the clientThe principal name the client sends
AADSTS90023 InvalidRequestThe authentication service request isn't validMalformed or unsupported requestCapture and compare with the protocol docs
AADSTS900236 InvalidRequestSamlPropertyUnsupportedThe SAML request sets a property (named in the message) that isn't supportedService provider settingRemove that property in the app's SAML settings
AADSTS9002313 InvalidRequestThe request is malformed or invalidSomething wrong in the request to an endpointMicrosoft suggests a Fiddler trace of the failing request
AADSTS9002332The app is for Microsoft Entra users only, so the /consumers endpoint can't serve the requestPersonal-account flow against a work-only app/organizations or tenant endpoint, or change supported account types
AADSTS90024 RequestBudgetExceededErrorA transient error occurredRequest budget exceededRetry with backoff
AADSTS90027Tokens can't be issued from this API version for personal Microsoft accountsThe app uses the v1.0 protocol for consumer accountsThe vendor must move to the v2.0 protocol

Directory service, national clouds and throttling (90033–900612)#

CodeMeaningUsual causeFirst check
AADSTS90033 MsodsServiceUnavailableThe Microsoft Online Directory Service (MSODS) isn't availableService-side problemService health; retry
AADSTS90036 MsodsServiceUnretryableFailureUnexpected, non-retryable error from the directory serviceService-side problemOpen a support case
AADSTS90038 NationalCloudTenantRedirectionThe tenant belongs to a national cloud that the current cloud doesn't federate withThe app signs in against the wrong cloudUse the sign-in host of the tenant's cloud
AADSTS900384The JWT token failed signature validationSeveral; the returned exception says whichException text, then the signing key or certificate
AADSTS90043 NationalCloudAuthCodeRedirectionThe feature is disabledAn authorization-code flow crossing national cloudsKeep the whole flow in one cloud
AADSTS900432Confidential clients aren't supported in a cross-cloud requestConfidential client used across cloudsWhich cloud each step of the flow targets
AADSTS90051 InvalidNationalCloudIdThe national cloud identifier isn't validWrong cloud or instance settingThe app's cloud or instance configuration
AADSTS90055 TenantThrottlingErrorToo many incoming requests; raised for blocked tenantsAn app or script flooding the serviceFind the noisy client; cache tokens
AADSTS90056 BadResourceRequestTo redeem a code for a token, the app must POST it to the /token endpointWrong endpoint or methodApp registrations › Endpoints against the app's settings
AADSTS900561 BadResourceRequestInvalidRequestThe endpoint accepts only certain HTTP verbs (such as POST) and got another (such as GET)Developer error, or the user pressed BackIgnore it after a Back press; otherwise fix the method
AADSTS900612The provider's signing keys from its JWKS endpoint can't be parsedAn external identity provider publishes keys in an unexpected formatThe provider's JWKS output

External users and WS-Federation (90072–90087)#

CodeMeaningUsual causeFirst check
AADSTS90072 PassThroughUserMfaErrorThe external account doesn't exist in the tenant, so it can't meet the tenant's MFA requirementGuest never added, or an ImmutableID mismatch for synced usersAdd the account as an external user. Guide
AADSTS90081 OrgIdWsFederationMessageInvalidA WS-Federation message couldn't be processed because it isn't validMalformed message from the app or the identity providerCapture the WS-Federation request and response
AADSTS90082 OrgIdWsFederationNotSupportedThe authentication policy selected for the request isn't supportedThe app requests an unsupported policyThe app's WS-Federation settings
AADSTS90084 OrgIdWsFederationGuestNotAllowedGuest accounts aren't allowed for this siteA guest opened a member-only siteUse a member account
AADSTS90085 OrgIdWsFederationSltRedemptionFailedNo token: the company object isn't provisioned yetTenant still being provisionedWait, then retry
AADSTS90086 OrgIdWsTrustDaTokenExpiredThe user's DA token has expiredExpired token in a WS-Trust exchangeSign in again
AADSTS90087 OrgIdWsFederationMessageCreationFromUriFailedThe WS-Federation message couldn't be built from the URIMalformed sign-in URLParameters in the WS-Federation URL
CodeMeaningUsual causeFirst check
AADSTS90090 GraphRetryableErrorThe service is temporarily unavailableTransientRetry with backoff
AADSTS90091The Graph service is unreachableService-side problemRetry; service health
AADSTS90092A non-retryable Graph errorService-side problemSupport case with the correlation ID
AADSTS90093 GraphUserUnauthorizedGraph returned a forbidden error: the user can't grant what the app requestsPermissions only an admin can grantAdmin consent. Guide
AADSTS90094 AdminConsentRequiredAdministrator consent is requiredUser consent restricted, or high-privilege permissionsAdmin consent or the workflow. Guide
AADSTS900382Confidential clients aren't supported in a cross-cloud request (same text as 900432)Confidential client used across cloudsWhich cloud each step targets
AADSTS90095 AdminConsentRequiredRequestAccessAdmin consent workflow interrupt: the user is told to ask an admin for approvalExpected when the workflow is onReview Enterprise apps › Admin consent requests

Partner apps, parameters, device code and endpoints (90099–90130)#

CodeMeaningUsual causeFirst check
AADSTS90099The app isn't authorized in the tenant, so partner delegated admins can't use itNo pre-consent in the customer tenantPre-consent, or the Partner Center API that authorizes it
AADSTS900971No reply address was providedRequest without a redirect URIredirect_uri and the registered URIs
AADSTS90100 InvalidRequestParameterA parameter is empty or not validBad value in the requestThe parameter named in the message
AADSTS901002The resource request parameter isn't supportedv1.0-style request sent to the v2.0 endpointUse scopes, such as https://graph.microsoft.com/.default
AADSTS90101 InvalidEmailAddressNot a valid email address (format: someone@example.com)TypoThe address entered
AADSTS90102 InvalidUriParameterThe value must be a valid absolute URIRelative or malformed URI, such as a redirect URIUse the full URI, including the scheme
AADSTS90107 InvalidXmlThe request isn't valid: the data contains invalid charactersBad characters or encoding in XML (SAML, WS-Federation)Encoding of the request
AADSTS90112The application identifier is expected to be a GUIDName or URI sent instead of the client IDUse the application (client) ID
AADSTS90114 InvalidExpiryDateThe bulk token's expiry time would produce a token that has already expiredExpiry set in the pastRequest the bulk token again with a future expiry
AADSTS90117Invalid request inputBad input from the clientCapture the request
AADSTS90119 InvalidUserCodeDevice code flow: the user code is null or emptyNo code enteredEnter the code shown on the device
AADSTS90120 InvalidDeviceFlowRequestThe request was already authorized or declinedThe device code was reusedStart a new device code sign-in
AADSTS90121 InvalidEmptyRequestInvalid empty requestThe client sent nothing usableCapture the request
AADSTS90123 IdentityProviderAccessDeniedNo token: the identity or claims provider denied the requestRefusal at the federated or external providerThe provider's own logs
AADSTS90124 V1ResourceV2GlobalEndpointNotSupportedThe resource isn't supported over /common or /consumersAuthority set to a global endpointUse /organizations or a tenant-specific endpoint
AADSTS90125 DebugModeEnrollTenantNotFoundThe user isn't in the systemMistyped user nameCheck the user name
AADSTS90126 DebugModeEnrollTenantNotInferredThis user type isn't supported on the endpoint; the tenant can't be inferred from the user nameThe authority can't resolve the tenantUser name, and a tenant-specific endpoint
AADSTS90130 NonConvergedAppV2GlobalEndpointNotSupportedThe app isn't supported over /common or /consumersAuthority set to a global endpointUse /organizations or a tenant-specific endpoint

How to verify a fix#

  1. Re-run the same request. Good: the token endpoint returns an access_token; if another problem was hiding behind the first, you get a different code in error_codes.
  2. Check that the authority in the app's settings matches its Supported account types: a tenant ID or /organizations for work-only apps, and the right cloud's sign-in host.
  3. Consent codes: after an admin approves the request under Admin consent requests, the user signs in without the prompt.
  4. Transient codes (90006, 90024, 90033, 90090): they should clear on retry with backoff. If they don't, check service health in the Microsoft 365 admin center and open a case with the correlation ID and timestamp.
  5. For app-only flows with sign-in logs in Log Analytics, confirm the failures stop:
    KQL
    AADServicePrincipalSignInLogs
    | where TimeGenerated > ago(7d)
    | where ResultType in ("90002", "90014", "900144", "9001023", "90055")
    | summarize Failures = count() by ResultType, ServicePrincipalName, bin(TimeGenerated, 1d)

For reading the entries themselves, see Reading Microsoft Entra sign-in logs like an engineer; for app registration hygiene, see App registrations and service principals.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)