Skip to content

/codes/entra-id/aadsts-error-codes

AADSTS error codes: Microsoft Entra sign-in errors seen in admin PowerShell modules

The commands on this page have not been executed by our verification runner yet.updated
tool
Microsoft Entra ID
versions
Microsoft Entra ID
os
any

AADSTS codes are errors from the Microsoft Entra security token service (STS). Admin modules such as Connect-ExchangeOnline, Connect-MgGraph, Connect-MicrosoftTeams and Connect-SPOService pass them through when sign-in fails. The number identifies the problem; the text after it often includes the app ID, tenant or user. The names and meanings below are from Microsoft's AADSTS error code reference.

User sign-in

CodeNameMeaning and usual fix
AADSTS50034UserAccountNotFoundThe account is not in this tenant: typo in the user name, or signing in to the wrong tenant
AADSTS50053IdsLockedAccount locked after too many failed attempts, or sign-in from a malicious IP; check the failure reason in the sign-in log
AADSTS50055InvalidPasswordExpiredPasswordPassword expired; reset it
AADSTS50057UserDisabledThe account is disabled
AADSTS50076UserStrongAuthClientAuthNRequiredMFA is required (Conditional Access, per-user MFA or a new location); sign in interactively and complete MFA
AADSTS50079UserStrongAuthEnrollmentRequiredThe user must register security info for MFA first
AADSTS50126InvalidUserNameOrPasswordWrong user name or password
AADSTS50173(grant expired)The refresh token was revoked, for example after a password change; sign in again
AADSTS16000InteractionRequiredThe account does not exist in the tenant (often a personal Microsoft account); sign in with a work account
CodeNameMeaning and usual fix
AADSTS53000DeviceNotCompliantConditional Access requires a compliant device; enroll the device in Intune or use a managed one
AADSTS53003BlockedByConditionalAccessA Conditional Access policy blocked the sign-in; see the Conditional Access tab of the sign-in log
AADSTS65001DelegationDoesNotExistNo consent for the app; consent interactively or have an admin grant consent
AADSTS90094AdminConsentRequiredThe requested permissions need admin consent
AADSTS50105EntitlementGrantsNotFoundThe app requires assignment and the user is not assigned to it
AADSTS50020UserUnauthorizedThe account comes from another identity provider and is not a guest in this tenant

App registrations and app-only scripts

CodeNameMeaning and usual fix
AADSTS700016UnauthorizedClient_DoesNotMatchRequestThe application ID was not found in the tenant: wrong -AppId/-ClientId, or wrong tenant
AADSTS7000215(invalid client secret)The client secret value is wrong (often the secret ID was used instead of the value)
AADSTS7000222InvalidClientSecretExpiredKeysProvidedThe client secret expired; create a new one or use a certificate
AADSTS700027(client assertion failed)Certificate sign-in failed signature validation; the certificate does not match the one on the app
AADSTS500011InvalidResourceServicePrincipalNotFoundThe resource API has no service principal in the tenant, or the request went to the wrong tenant
AADSTS90002InvalidTenantNameThe tenant name or ID was not found; check -TenantId or -Organization
AADSTS70011InvalidScopeThe requested scope is invalid
AADSTS50011InvalidReplyToThe redirect URI does not match the app registration

Find the details of a failure

  1. Copy the Correlation ID and timestamp from the error, if shown.
  2. In the Microsoft Entra admin center open Monitoring and health > Sign-in logs (for app-only failures, the Service principal sign-ins tab) and filter on the user or app.
  3. The sign-in shows the error code, the failure reason and, for policy errors, the Conditional Access policies that applied.

Sources