azureblog.co.uk
← cd ~/errors
// entra id sign-in error · app registration and tokens

AADSTS50027

InvalidJwtToken

What Microsoft says

Invalid JWT token because of the following reasons: doesn't contain nonce claim, sub claim; subject identifier mismatch; duplicate claim in idToken claims; unexpected issuer; unexpected audience; not within its valid time range ; token format isn't proper; External ID token from issuer failed signature verification.

How to fix it

Microsoft doesn't publish a specific fix for this code beyond the description above. This site groups it under app registration and tokens, based on that description, so start with the steps below.

How to investigate

  1. Compare what the app sends (client ID, redirect URI, scopes, tenant) with the app registration.
  2. Decode the token or request: the JWT and SAML decoders on this site show exactly what was sent.
  3. Check the app's credentials (secrets and certificates) and whether the service principal exists and is enabled in this tenant.
  4. Search the sign-in logs for the request ID or correlation ID from the troubleshooting details on the error page.

Tools that help

The description is quoted from Microsoft's error code reference. The grouping and investigation steps are this site's guidance.