Alvaro Pereira
Alvaro Pereira

Reputation: 643

Azure AD B2C - Wrong URL

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?

Upvotes: 2

Views: 290

Answers (3)

whatisthejava
whatisthejava

Reputation: 503

Yeah same issue as well, updating lib fixed it

Upvotes: 0

Sujatha
Sujatha

Reputation: 302

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.

Upvotes: 0

Alvaro Pereira
Alvaro Pereira

Reputation: 643

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

Upvotes: 3

Related Questions