External api management service can't resolve Azure function service name

Mark 11 Reputation points
2022-02-23T22:16:12.847+00:00

Currently I have a function created with vnet integration and a HTTP trigger. I'm attempting to use API Management to expose my serverless function that is behind a secure VNET.

After linking my function in the api management portal, whenever I try and test it with a simple GET request I get 500 errors with the cause being:

"messages": [

    "Error occured while calling backend service.",
    "The remote name could not be resolved: 'my-redacted-test-name.azurewebsites.net'"
]

Things I've tried:

  • I've double checked that the correct security group rules have been opened for api management to work
  • I've ensured that both my api management (external) is in the same vnet as my Serverless function
  • Ive check that my private dns zone is linked with my vnet.
  • When creating my serverless function I enabled inbound (which created a private endpoint) and outbound access

If anyone knows what could potentially be causing this issue, I would greatly appreciate the help

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,805 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,385 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,205 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,581 Reputation points
    2022-02-28T04:08:41.26+00:00

    @Mark Thanks for reaching out. As per the error, the APIM is not able to resolve your azure function app. Can you please verify if the custom DNS is correctly setup and you can refer to this document for more details. Outbound access on port 53 is required for communication with DNS servers. If a custom DNS server exists on the other end of a VPN gateway, the DNS server must be reachable from the subnet hosting API Management. I will also suggest you to review this document for the setup part.

    0 comments No comments