I created a SPA application in Azure AD and trying to generate access token via PKCE flow from postman.
I am following this msdoc : Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra | Microsoft Docs
To generate code, I am using below authorize endpoint as mentioned in above document like
https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
client_id=myclientid
&response_type=code
&redirect_uri=myredirecturi
&response_mode=query
&scope=https://graph.microsoft.com/.default
&code_challenge=YTFjNjI1OWYzMzA3MTI4ZDY2Njg5M2RkNmVjNDE5YmEyZGRhOGYyM2IzNjdmZWFhMTQ1ODg3NDcxY2Nl
&code_challenge_method=S256
But I am getting error like below:
AADSTS501491: Invalid size of Code_Challenge parameter.
What is the valid value for code_challenge parameter and how to generate it?