How to find Azure Function App IP for white-listing How to find Azure Function App IP for white-listing azure azure

How to find Azure Function App IP for white-listing


In the background behind an Azure Function is an Azure App Service. So, how do you find the IP addresses it use?

There is the section containing current outbound IP addresses in the App Service settings page, see

Azure App Service - Outbound IP Addresses

But keep in mind, since the platform is a PaaS service, it might, without any notice, move to other hardware and get a totally different set of outbound IP addresses.

See this twitter conversation with Azure Support, for more details. Conclusion of the discussion is the IP range is not static and may change.

The only surefire way to know what IP's an Azure Function may be using, is to refer to the XML document published by Microsoft Azure that contain the entire IP range of all data centers, making this task a little difficult to implement.


Unfortunately things have changed since Kim's answer. You now have to go into a JSON file via Azure Resource Manager to find the possible outbound IP addresses. Per the current Microsoft documentation:

  1. Sign in to the Azure Resource Explorer.
  2. Select subscriptions > {your subscription} > providers > Microsoft.Web > sites.
  3. In the JSON panel, find the site with an id property that ends in the name of your function app.
  4. See outboundIpAddresses and possibleOutboundIpAddresses.

Alternatively, you can also do it via the Az Powershell Module:

az webapp show --resource-group <group_name> --name <app_name> --query outboundIpAddresses --output tsv

az webapp show --resource-group <group_name> --name <app_name> --querypossibleOutboundIpAddresses --output tsv


I used this technique to dynamically identify the IP

Periodically the health endpoint will be called and the returned IP will be whitelisted.

app.get("/health", function(req, res) {    unirest    .get('https://<fn-appname>.azurewebsites.net/ipinfo')    .headers({'Accept': 'application/json', 'Content-Type': 'application/json'})    .send()    .then((response) => {        res.send(response.body);      });});app.get("/ipinfo", function(req, res) {    const ipaddress=req.headers['x-forwarded-for'];    res.send({ip_address:ipaddress});});