The reply URL returns error using https://xxxxx.azurewebsites.net/xxxxxxx/ and works well using https://xxxxx.azurewebsites.net/

Vinir Shah picture Vinir Shah · Jul 2, 2019 · Viewed 8.7k times · Source

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.

Answer

Joey Cai picture Joey Cai · Jul 3, 2019

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.