aminrd
aminrd

Reputation: 4980

The reply URL specified in the request does not match the reply URLs

While setting up a connection to Microsoft Azure API for a web application during development, I am dealing with the following error:

AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'b9c2d921-$$$$-$$$$-$$$$-$$$$$$$$$$$$'. More details: Reply address did not match because requested address had a trailing slash.

Initially, I had another error posted in this link and changing the platform configuration from SPA to Web did actually solve it.

I have already set up a redirection URL in the app Authentications:

Redirection URL

Any idea about fixing this issue?

Upvotes: 0

Views: 4514

Answers (1)

kavya Saraboju
kavya Saraboju

Reputation: 10831

Cause: 

The application is attempting to authenticate against AAD but is failing to match the URl it is looking for. You might have not given correct reply URL in the registration of your app in AAD, or you have not specified the correct url as the redirect_uri query parameter of the URL when redirecting to the AAD sign in page to allow the user to enter credentials.

Issue can be resolved if you configure same/matching URLS at both places in app registration in AAD and in the web application and also make sure you clear cache.

How to check if both URIs are same: 

You can see the reply url/redirect uri during sign-in /Authentication request in the address bar of the browser on the error screen (Recommended to use Chrome or Edge browser) . If it is SAML request, Assertion Consumer Service(ACS)- represents the reply url.

sign-in page

Example:

enter image description here

Work arounds:

Follow these steps to check for your configured Reply URLs in AAD while following the WAYS mentioned and add additional URLs if you want the new uri added in the list :

  • Sign into portal.azure.com
  • Navigate to Azure Active Directory in the left side bar > App registrations > Your app > Authentication > Redirect URIs.

WAY1

Remove the slash at the end of the Redirect uri .Try sign-in.

( As reply url in the request is ending with “/” but the reply url configured on the application (with client ID in above error) might be ending without a slash.)

WAY2:

See if both URIs have same protocol (https://) As AAD will treat http://website.com and https://website.com as two different URLs.

Reference: AAD Auth Failures - Incorrectly configured reply URLs for application | Microsoft Docs

Other wise , Suggest you to re-configure your AAD application on Azure and set one or more valid reply URLs.

Upvotes: 1

Related Questions