The error message you are encountering, invalid_request: The provided value for the input parameter 'redirect_uri' is not valid, indicates that the redirect URI you are using does not match any of the redirect URIs registered for your client application. To resolve this issue, you should check the following:
- Verify the Redirect URI: Ensure that the redirect URI you are using in your request exactly matches one of the URIs registered in your application settings. This includes checking for any typos, trailing slashes, or case sensitivity.
- Register the Redirect URI: If the URI you are trying to use is not registered, you will need to register it in the Azure portal under your application's settings.
- Use the Correct Application ID: Make sure you are using the correct application ID (Client ID) that corresponds to the registered redirect URI.
By ensuring that the redirect URI is properly registered and matches exactly, you should be able to resolve the invalid request error.