Search code examples
azure-active-directoryazure-ad-b2cazure-ad-b2c-custom-policy

During signIn receiving B2C error code ‘AADB2C99059’


Integrated a web application(SPA) with azure B2C for user authentication. During logging from web app, I’m seeing this b2c exception code (AADB2C99059) on the UI instead of actual b2c login screen. Please suggest me on this scenario, whether I have to make any changes in b2c configuration or the backend application code to make any changes.


Solution

  • The Error (AADB2C99059: The supplied request must present a code challenge) generally comes when you are missing your code challenge in run now URL. You can test the user flow without implementing it in an application by appending a static value for the code_challange on the run now url.

    For example, you can append &code_challenge=YTFjNjI1OWYzMzA3MTI4ZDY2Njg5M2RkNmVjNDE5YmEyZGRhOGYyM2IzNjdmZWFhMTQ1ODg3NDcxY2Nl to the url and it should work for you.

    If above code challenge is not working for you can also generate your code challenge using C# code and pass it to the request URL.

    You can refer this document to know how to generate the code_challenge