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:
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?
OpenID Settings
/azureauth/auth is my controller and my method.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With