Bug in Azure Flex Consumption Plan

Dimitrios Bardis 5 Reputation points
2026-04-24T10:29:39.3733333+00:00

1. Problem Summary

My Azure Function App (Flex Consumption) is VNet‑integrated and configured to call Azure Document Intelligence through a Private Endpoint. DNS resolution inside the Function App resolves the endpoint to the correct private IP, and a curl test from the Function App container returns HTTP 200. However, the actual outbound call made by the function runtime is sent from a public outbound IP, not from the VNet‑integrated subnet. As a result, Document Intelligence rejects the request with:

Code

403: Traffic is not from an approved private endpoint

This indicates that Flex Consumption is starting function workers that are not VNet‑integrated, even though the Function App is configured for VNet integration. I need confirmation whether this is expected behavior

2. Technical Details

Environment:

Azure Functions Flex Consumption plan

Python Function App

VNet integration enabled

Private Endpoint for Document Intelligence

Private DNS zone linked to the same VNet

Public network access disabled on the Cognitive Service

Terraform‑based deployment

Observed behavior:

DNS resolution inside the Function App container is correct:

The hostname

Code

ragdocintsvc.cognitiveservices.azure.com

resolves to the private endpoint IP:

Code

10.50.0.69

curl test from the Function App container succeeds:

Code

HTTP 200 Service Operational

This confirms:

Private DNS zone is correct

Private Endpoint is correct

VNet integration works on this instance

However, the actual outbound call made by the function runtime uses a public outbound IP:

Code

Outbound IP: 74.241.138.252

This proves that the worker executing the function is not VNet‑integrated, even though the Function App is configured for VNet integration.

Document Intelligence rejects the call:

Code

403: Traffic is not from an approved private endpoint

This is expected when the request reaches the public endpoint instead of the private one.

Conclusion:

Flex Consumption appears to be scaling out to workers that are not attached to the VNet, causing inconsistent outbound routing. This makes Private Endpoint access unreliable on Flex Consumption.

Request:

Please confirm whether Flex Consumption guarantees VNet integration for all scale‑out workers. If not, please link to a documentation where it is stated that it does not guarantee that. Is it so that Flex is used for non-private solutions? If Flex is supposed to be used also for private networking then this is a bug.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-04-24T10:29:58.9233333+00:00

    Flex Consumption plan function apps support outbound virtual network integration and are designed to route outbound traffic through the integrated subnet when configured, including for private endpoint scenarios.

    From the documented behavior:

    • Flex Consumption explicitly supports Virtual network integration (outbound) and Private endpoints (inbound) as part of its networking feature set.
    • For Flex Consumption, outbound traffic is routed through shared gateways dedicated to the subnet used for VNet integration. Up to 27 shared gateways (27 IPs) are used per subnet, regardless of how many apps are integrated.
    • The subnet must be dedicated, delegated to Microsoft.App/environments, and at least /27 in size (with /27 recommended for a single app and /26 for multiple apps). Using a smaller subnet or multiple apps on a /27 reduces available outbound network capacity but does not change the expectation that outbound traffic is routed via the VNet integration.

    There is no statement in the referenced documentation that Flex Consumption workers are allowed to bypass VNet integration and send outbound traffic directly from public IPs when VNet integration is configured. The documented model for Flex Consumption is that outbound traffic from function app instances is routed through the shared gateways in the integrated subnet.

    The behavior described (some executions using a public outbound IP and being rejected by a private‑endpoint‑only Cognitive Service) is therefore not documented as expected behavior and is not described as a limitation of Flex Consumption in the provided material. Flex Consumption is documented as supporting private networking via VNet integration, not as a “non‑private only” plan.

    Given the documentation:

    • Flex Consumption is intended to be usable with private networking (VNet integration and private endpoints).
    • There is no documented requirement to move to Premium solely to “guarantee” that some workers are VNet‑integrated while others are not; instead, Flex Consumption’s outbound model is that traffic is routed via the integrated subnet’s shared gateways.

    If this behavior persists with a correctly configured, dedicated, and properly sized subnet, it aligns with a service issue rather than a documented, by‑design limitation.

    For further troubleshooting and escalation:

    1. Verify the subnet used for VNet integration meets Flex Consumption requirements:
      • Dedicated subnet.
      • Delegation: Microsoft.App/environments.
      • Size: at least /27, /26 recommended for multiple apps.
    2. Use the Network troubleshooter for the Function App (Diagnostic and solve problems → Network troubleshooter) to validate:
      • VNet integration status.
      • Private IP assignment to instances.
      • DNS configuration and connectivity to dependencies.
    3. If configuration is valid and the issue continues, this should be treated as a service‑side bug and escalated via Azure Support.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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