Hello, to avoid getting "The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application" error you need to ensure your React application is configured to use one of the reply URLs configured in your Azure AD app registration. Web.config files are used for ASP.NET and ASP.NET applications but not for React. React applications usually bring settings embbeded within its compiled/transpiled/minized code, so it's important to ensure environment specific values are being set before build.
- To take a look to whare replys URL are configured for your Azure AD application take a look at Configure platform settings.
- To find what reply URL is being sent during authentication request Collect a network trace in the browser (Browser-based apps only) and look for entries sent to the authorization endpoint (
https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize
) - To find how to make your React application target multiple environments take a look to How To Correctly Build a Multi-Environment React App?
Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.