AADSTS500112: The reply address does not match the reply address provided when requesting Authorization code

3.1k Views Asked by At

I searched through the internet yet I couldn't find this specific problem.

AADSTS500112: The reply address 'http://localhost:3000/#/training' does not match the reply address 'http://localhost:3000/' provided when requesting Authorization code.

I am getting this error and my config in the app and the redirect uri is http://localhost:3000/#/training

I have no idea why am I getting this error.

1

There are 1 best solutions below

3
On

According to Redirect URI (reply URL) restrictions | Microsoft Docs ,

When you try to use http scheme ,the port component (for example, :5001 or :443) is ignored for the purposes of matching a redirect URI. As a result, all of these URIs are considered equivalent.

For example , if you have more than one redirect uri for different purposes say http://localhost:5000/myapp and http://localhost:5001/myapp, both are considered equivalent and AAD may have configured for different application. So mostly ,the redirect URL for web apps and services must begin with the https scheme . If you want to use the scheme http, you may try to use http:\\localhost or by using different names in case of multiple redirect uris present with different ports.

If still issue persists you may raise a support request.