Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 497
Patrick Avatar asked Oct 22 '19 13:10

Patrick


People also ask

What is reply URL in Azure AD?

A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token.

How do you set a response URL?

To set your reply URL in Azure:Select Azure Active Directory | App Registration, then select your app. Select Add a Redirect URI. Enter your reply URL in the Redirect URI field. Select Save.


1 Answers

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.

like image 153
Zacharious Avatar answered Sep 28 '22 05:09

Zacharious