How to test or debug api requests in an APIM with the disabled public network access ?

ahd 65 Reputation points
2025-01-16T16:03:07.1633333+00:00

In an APIM, with basic tier, public network access disabled and integrated with an application gateway. I have set up a inbound private endpoint connection that resolves to apim gateway url https://apim.test.com When I try to test or debug the requests, I always get the error The remote name could not be resolved: 'apim.test.com'"and the backend service is resolved in the policies.

Although the current endpoint works in real time, I'm trying to figure out how to debug some faulty endpoints using traces or test window.

User's image

User's image

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,261 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 15,396 Reputation points
    2025-01-17T12:53:07.3233333+00:00

    Hello ahd,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to test or debug api requests in an APIM with the disabled public network access.

    This might not be too challenging but depends on the steps you take.

    The error "The remote name could not be resolved" shows a DNS issue. Test the remote DNS and verify that your network configuration allows traffic between the application gateway and the APIM instance, and the private endpoint is correctly set up and accessible.

    So, to enable tracing, preform trace and Debugging with Visual Studio Code use these links for more details - https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-api-inspector and https://learn.microsoft.com/en-us/azure/api-management/api-management-debug-policies

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.