Skip to main content

AADSTS50147: PKCE code challenge is missing or has an invalid length

The PKCE code challenge is missing or has an invalid length.

What to check​

  1. Check that the authorisation request includes a code_challenge in the format and length required by the selected method.

Official reference​

Microsoft Learn: AADSTS error codes

Microsoft error lookup​

Message summary: The lookup describes an invalid PKCE challenge length. It does not establish that the parameter was omitted.

Microsoft remediation: Ask the application owner to correct the way the client sends the PKCE challenge and verifier.

Open AADSTS50147 in Microsoft’s lookup