Outbound IP addresses for Azure Function App

Francisco Dominguez 386 Reputation points


I'm using certain API that needs IP whitelisting to be able to use it. I've built a couple of Azure Functions inside my Azure Function App and both of them make requests to that API. I have whitelisted the outbound IP addresses of the Azure Function App.

Today, when the trigger of the Azure Functions ran, they were using a different IP out of the list of the outbound IP addresses, and therefore, it was not whitelisted in the API:


My list of outbound IP addresses does not include an IP similar to that one sending the request to the API.

Could you please guide me on what's going on here?


Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,642 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,451 Reputation points

    @Francisco Dominguez ,

    Thanks for reaching out to Q&A forum.

    Please note that, the ip adresses of the function app shown in the portal (networking section) is actually the datacenter outbound ip address. So you might want to add the function apps' data center (Azure region) to an allowlist. You can download a JSON file that lists IP addresses for all Azure data centers.

    Reference: https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?msclkid=ada8be7ed0fb11ecb04d1cc6c5e3a0cd&tabs=portal#data-center-outbound-ip-addresses

    The outbound ip addresses can change at any time if you are on Consumption or premium plan due to the Autoscale behavior. For a dedicated plan, the outbound ip address can change if you take any action that can change the inbound IP address or change your Dedicated (App Service) plan pricing tier.

    You can control the IP address of outbound traffic from your functions by using a virtual network NAT gateway to direct traffic through a static public IP address. You can use this topology when running in a Premium plan or in a Dedicated (App Service) plan. Another option is to deploy the function in an App Service Environment.

    Reference: https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?msclkid=ada8be7ed0fb11ecb04d1cc6c5e3a0cd&tabs=portal#outbound-ip-address-changes

    2 people found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. Christophe 1 Reputation point


    @Francisco Dominguez , I can see you did not have a proper answer to your question.

    I have exactly the same problem, after hours debugging because I thought it was highly improbable that microsoft is giving us a wrong list of ip addresses, I found out the ip adress for my function is not in the list of what is on the Networking section of the function app (or returned through Azure CLI https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?msclkid=ada8be7ed0fb11ecb04d1cc6c5e3a0cd&tabs=azurecli#find-outbound-ip-addresses) :,,,,,,,,,,,,,,,,,,,,,,,,

    @MughundhanRaveendran-MSFT can we please have a convincing explanation of what is happening here and how to fix because the ip is changing in a range we do not know about : now it is

    0 comments No comments

  2. Christophe 1 Reputation point

    Ok I just found the ranges containing and the one of are in a "Service Tag" called "AzureCloud.westeuropeAzureCloud.westeurope"
    I could add the ServiceTah to my Network security group instead of a list of IP addresses.

    Still I dont't undestand what is the list in the Networking section of the function app and when calling :
    az functionapp show --resource-group <GROUP_NAME> --name <APP_NAME> --query outboundIpAddresses --output tsv
    az functionapp show --resource-group <GROUP_NAME> --name <APP_NAME> --query possibleOutboundIpAddresses --output tsv

    It currently seems to me the documentation is wrong when it says :"s. Any outbound connection from a function, such as to a back-end database, uses one of the available outbound IP addresses as the origin IP address"
    In https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?msclkid=ada8be7ed0fb11ecb04d1cc6c5e3a0cd&tabs=azurecli#find-outbound-ip-addresses

    0 comments No comments

  3. Christophe 1 Reputation point

    @Francisco Dominguez The range containing is in AzureCloud.centralus.
    You should be able to use the ranges of this ServiceTag or add the service tag name in a Network Security Group like I did

    0 comments No comments

  4. Christophe 1 Reputation point

    Reading this paragraph
    "When a function app that runs on the Consumption plan or the Premium plan is scaled, a new range of outbound IP addresses may be assigned. When running on either of these plans, you can't rely on the reported outbound IP addresses to create a definitive allowlist. To be able to include all potential outbound addresses used during dynamic scaling, you'll need to add the entire data center to your allowlist."
    I understand that the outbound address list is not reliable. "definitive" could be removed as all the time I run individually my function (no scale up involved) the ip is outside of the list.
    This list is highly misleading in Consumption plan and Premium plan cases, there should be a warning on the Networking tab of the function app under the list

    0 comments No comments