2
votes

I need to implement Azure AD b2c in a an old WEBFORMS application (not an MVC application). I followed the instructions and validated the Azure AD B2C configuration by running this sample. After that, I've added all the applicable nugets to my OLD WEBFORMS application and copy the appropriated code. What I have is an EXCEPTION when calling the Challenge method. When I look at network trace I saw an extra "?" on the authentication URL before the client_id

The URL generated by the sample, that works, is:

"https://login.microsoftonline.com/mytenant.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1_signup01&client_id=myguid&redirect_uri=..."

The URL generated by my old WEBFORMS application is:

"https://login.microsoftonline.com/mytenant.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1_signup01?client_id=myguid&redirect_uri=..."

How can I fix this?

3

3 Answers

3
votes

I just found the answer. Everything is working after upgrade Microsoft.IdentityModel.Protocol.Extensions nuget package to latest version.

0
votes

I had faced the same issue. this is purely because of dll. You check your sample application, and find what version of dlls they are using, install the same in your app, then it will work.

0
votes

Yeah same issue as well, updating lib fixed it