Patrick
Patrick

Reputation: 5836

Azure AAD - AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application

I am pulling my hair out with this one.

I have a .Net Core 2.1 application on the back-end with Angular 7 in the front.

I've already done all the difficult work of getting integration with Azure Active Directory up and working, and it is properly connecting me to AAD, asking for credentials, then at the last stage I get:

AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application

I am testing this locally for rapid development and I have my callback set to:

https://localhost:5001/azureauth/auth

This is directly in the Azure Portal:

enter image description here

This controller method currently does nothing but hit a break point, which if I hit it manually in the browser properly breaks in the controller method.

Azure won't call me back on it after a successful AD login.

What am I missing?

Edit I noticed that the query string when connecting to AAD has the following in the "redirect" portion, which does not match what I have in Azure as it does not have the path it's just localhost:5001 ... does this matter?

Redirect Path

OpenID Settings

OpenID Settings

/azureauth/auth is my controller and my method.

Error

Upvotes: 6

Views: 10374

Answers (1)

Zacharious
Zacharious

Reputation: 555

The Application's list of Redirect URIs must contain the PostLogoutRedirectUri value, exactly as written in OpenIdSettings.

In this case, go to AAD Portal and add a Redirect URI for http://localhost:5001

Ideally, you should update the OpenIdSettings and Application Registration to use https instead of http.

Upvotes: 6

Related Questions