Reputation: 1016
I am creating a web app in ASP.NET Core that uses Azure AD for authentication. When debugging, everything works fine. When published to the local web server, an error occurs:
AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application
Right now, I have the reply_url in azure as https://localhost:5000/signin-oidc, and the callback url in appsettings.json as "/signin-oidc". When registering the app in Azure, you cannot set a local network location as a reply_url (eg. \\server\folderlocation). How can I set this up to have the redirect urls match?
Also, would IIS interfere with this somehow since I set it up like regular ASP.NET apps? I haven't messed with the IIS settings at all, and I've read with ASP.NET Core you basically have to make it pass through IIS because of the properties of aspnetcore.
Upvotes: 1
Views: 1318
Reputation: 30565
If you cannot declare two redirect url's then you need to change your reply_url. Or alternatively you can create another client for debugging purposes within your OAuth2 provider so that you want need to deal with this issue.
For the latter approach, Please note that you need to divide your app.settings one for debugging another for production.
Upvotes: 1