AADSTS501491: Challenge length does not match the PKCE method
The challenge length does not match the PKCE method.
What to check
- 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.