Skip to main content

AADSTS501491: Challenge length does not match the PKCE method

The challenge length does not match the PKCE method.

What to check​

  1. Generate the challenge using the method in the request and check the encoded length.

Official reference​

Microsoft Learn: AADSTS error codes

Microsoft error lookup​

Message summary: The challenge length does not match the PKCE method.

Microsoft does not provide a separate remediation in the lookup.

Open AADSTS501491 in Microsoft’s lookup