AADSTS500112 Reply Url Does Not Match


Hi All,


'https://abc.azurewebsites.net/' does not match the reply address 'https://abc.azurewebsites.net' provided when requesting Authorization code.

I am getting exception when acquiring access token from Azure AD. To provide you brief background, my application authorization server is azure AD and it's behind application gateway. Before i put it behind application gateway it was working fine and the moment application gateway is in place, i am facing this error and if you observe the reply URL is same which is added in the reply URL of the azure ad application.


Quick response is highly appreciated!

Many Thanks,

Tayyab Suhail  
@Prashant Pratap 

1 Reply

Hi @Tayyab Suhail 


Regarding the Reply-URL is this the same URL that the Application Gateway has, or is this the reply URL that you are going to reach after a Successful login ? 


I've come across this error several time specially when dealing with Azure AD B2C, and always this has been solved by giving the right destination URL after a successful login, as in https://abc.azurewebsites.com/profile or something like that, because as described in the error message you get is that the web page is trying to access another URL than you've specified in the Application in AAD.


Hope this helps

Kind Regards

Haflidi Fridthjofsson