1

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.

Ozan Mudul
  • 750
  • 1
  • 9
  • 20

1 Answers1

2

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.

kavyaS
  • 8,026
  • 1
  • 7
  • 19
  • How can I test it on my local pc then? Any ideas? I am pretty beginner at Microsoft services – Ozan Mudul Oct 14 '21 at 20:37
  • Can you please provide or edit the question with a screenshot of redirect uris present in azure AD portal in app registration>authentication blade – kavyaS Oct 18 '21 at 04:20
  • my url was set to http://localhost:3000/#/training, anyways I stop looking for solutions for now. I put the msal provider on top now and I get my access code when the app loads and store it on the session storage to retrieve access token. This approach solves my case. – Ozan Mudul Oct 18 '21 at 09:33