"error":"invalid_client","error_codes":[500112],"error_description":"AADSTS500112:

Basant Bhandari (External) 1 Reputation point
2022-11-30T14:43:51.387+00:00

response::
{"message":"error in authorization","result":{"correlation_id":"744db50c-ca48-4024-a858-24a38d924475","error":"invalid_client","error_codes":[500112],"error_description":"AADSTS500112: The reply address 'http://vapi-configapi-preprod.azurewebsites.net/configapi/v1/getAToken' does not match the reply address 'https://vapi-configapi-preprod.azurewebsites.net/configapi/v1/getAToken' provided when requesting Authorization code.\r\nTrace ID: 4008870f-4a1a-46d4-8571-984ee5ef4402\r\nCorrelation ID: 744db50c-ca48-4024-a858-24a38d924475\r\nTimestamp: 2022-11-30 14:37:05Z","timestamp":"2022-11-30 14:37:05Z","trace_id":"4008870f-4a1a-46d4-8571-984ee5ef4402"},"status":300}

I do not know how to fix it
i used msal library for oauth2.0

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,458 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,366 Reputation points Microsoft Employee
    2022-11-30T17:38:26.69+00:00

    @Basant Bhandari (External)
    Thank you for your post and for sharing your error message details!

    Error Message:
    Error AADSTS500112: The reply address 'http://vapi-configapi-preprod...' does not match the reply address 'https://vapi-configapi-preprod...'

    This error occurs if the redirect URI that the application sent doesn't match any of the redirect URIs that are registered on the application itself. I looked into the backend logs and referencing your error message, it seems that the Reply URL specified in the request begins with http while the registered reply address for your app starts with https.

    http://vapi-configapi-preprod...
    https://vapi-configapi-preprod...

    To fix the issue, follow these steps:
    Note: You can also change the Reply URL specified in the request to match that of your app

    1. Go to the Authentication blade of your Azure AD application in the Azure.
    2. Copy the <redirect URI> value from the error message.
    3. Add the redirect URI to the appropriate platform configuration. (i.e. web, single page app, etc.)
    4. Save.

    265823-image.png

    I hope this helps!

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.