3

I'm facing issue with the reply URL when authenticating on an Azure website. Everything works well when logging in normally, but it generates the "reply URL" error when logging in using some other pages.

As an example, using "https://xxxxx.azurewebsites.net/" works well, but using "https://xxxxxx.azurewebsites.net/xxxxxxxx/" returns the following error:

AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'XX2782c9-XXXX-XXXX-9789-XX750058XXXX'.

I have also tried using the instructions from Microsoft’s documentation on configuring the reply URL settings.

Error with: https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=XXXX82c9-6873-4096-XXXX-02750058XXXX&redirect_uri=https%3A%2F%2Fxxxxxxxxx.azurewebsites.net%2Fdashboard&state=xxxx2209-5986-4ce3-8498-8863daaxxxx&client-request-id=xxxxfcfa-fb5e-409e-834e-5fd4666bxxxx&x-client-SKU=Js&x-client-Ver=1.0.15&nonce=db5d9934-818a-43ad-98df-f1ced93f358d

Works with: https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=XXXX82c9-6873-4096-XXXX-02750058XXXX&redirect_uri=https%3A%2F%2Fxxxxxxxxx.azurewebsites.net%2F&state=xxxx2209-5986-4ce3-8498-8863daaxxxx&client-request-id=xxxxfcfa-fb5e-409e-834e-5fd4666bxxxx&x-client-SKU=Js&x-client-Ver=1.0.15&nonce=db5d9934-818a-43ad-98df-f1ced93f358d

It should work with the both reply URLs, however.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Vinir Shah
  • 53
  • 1
  • 8
  • 1
    Did you specified both possible reply urls within your application settings? – Martin Brandl Jul 02 '19 at 05:21
  • 1
    Adding to Martin's comment, ensure that correct URL is added in the Azure Portal > Azure Active Directory >App Registration. And as mentioned in the doc you're referring to - Note: During development it is a common practice to host your application on http://localhost and provide http://localhost/* as a reply url. – AjayKumar Jul 02 '19 at 19:49
  • I have already added this reply URL "https://xxxxx.azurewebsites.net/" to App registration. No luck – Vinir Shah Jul 04 '19 at 11:08
  • It's odd. You could [decode](https://www.urldecoder.org/) `https%3A%2F%2Fxxxxxxxxx.azurewebsites.net%2Fdashboard` to check if it is match with the reply url in azure ad. – Joey Cai Jul 05 '19 at 02:38

1 Answers1

1

I reproduce your problem. When you change reply url from https://xxxxx.azurewebsites.net/ to https://xxxxx.azurewebsites.net/xxxxx and try at once, it will get this error.

Just wait for several minutes and try again it will work fine. If you still have problem, please feel free to let me know.

You could refer to this article to send the sign-in request.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30