Redirect URl error while authecating API with Oauth 2.0 in APIM developer portal:AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'APP reg ID'.

Ashish Kapoor 21 Reputation points
2020-06-25T10:16:04.443+00:00

Hi,

I am getting error while getting authorization code in APIM developer portal that: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'App Reg Key'.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,935 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,500 questions
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,486 Reputation points
    2020-06-26T11:28:44.137+00:00

    Hi @Ashish Kapoor

    I still see the reply URL in the request is different than the reply URL registered for the app.

    Please navigate to Azure Portal > Azure Active Directory > App Registration > All Applications > Search with the App ID 2152827b-xxxx-xxxx-xxxx-5f819af0c4a8 > Under Authentication blade of the application update the Redirect URI to https://askXXXXn.developer.azure-api.net/signin-oauth/code/callback/cis-api-tester.

    -----------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.


2 additional answers

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,486 Reputation points
    2020-06-25T11:05:31.383+00:00

    Hi @Ashish Kapoor

    The reply url specified in your request is https://ask******n.developer.azure-api.net/signin-oauth/code/callback/cis-api-tester and the reply url (aka Redirect URI) registered in the Application (2152827b-xxxx-xxxx-xxxx-5f819af0c4a8) is https://ask******n.portal.azure-api.net/docs/services/cis-api-tester/console/oauth2/authorizationcode/callback. These URLs must match, if these URLs are different, then you get the above error.

    You need to either modify your code to match the reply url in the request with the reply url register on the app or update the reply url registered in the app to match with the one in the request.


    Please do not forget to "Accept the answer" wherever the information provided helps you.


  2. Ashish Kapoor 21 Reputation points
    2020-06-26T10:22:09.543+00:00

    Hi @amanpreetsingh-msft

    Thanks for your support.

    I am able to solve that issue,

    But I am facing one more issue related to that. I am able to get the Authorization Code in the Legacy Developer portal for APIM management. But I am getting error while accessing Authorization Code in the new developer portal for APIM.

    10784-testapis.jpg

    10717-test451.jpg

    Can you please help me in this

    Regards,
    Ashish