Vnet-integrated Open AI Deployment Issues

Dave Larsen - Admin 0 Reputation points
2025-11-18T16:33:18.4033333+00:00

We are trying to deploy a chatbot that utilizes an Azure OpenAI resource and a cognitive search resource. Both of these are integrated with an app service. We deploy everything with vnet integration and a virtual firewall in the Central US region. However, OpenAI is not available in the Central US Region.

We created our OpenAI resource in East US 2, and we have created private endpoints for all relevant resources. The private endpoint for OpenAI was built in Central US since we don't have a firewall in any other regions. Testing from Kudu consoles looks good with each resource returning a valid HTTP response (200 and 403) when called from the app service. However, the chat function does not work unless we turn public network access on for the the cognitive search service.

We have been banging our heads against the wall for a few weeks now. We can't figure out if this is an inter-region issue, an permissions issue, or if the cognitive search needs outbound access to something we're not aware of.

How can we make this work without enabling wide outbound access for the cognitive search service?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
{count} votes

2 answers

Sort by: Most helpful
  1. Dimple Rane 1,241 Reputation points
    2025-11-18T18:10:51.2533333+00:00

    It sounds like the issue might be related to the network configuration between regions. Here are a few things to check:

    1. Private Endpoint DNS Configuration: Ensure that the DNS settings for the private endpoints are correctly configured. The app service in Central US should resolve the private endpoint of the OpenAI resource in East US 2.
    2. Network Security Groups (NSGs): Verify that the NSGs allow traffic between the app service, OpenAI, and cognitive search resources.
    3. Service Endpoints: Ensure that service endpoints are correctly configured for the cognitive search service.
    4. Firewall Rules: Double-check the firewall rules to ensure they allow the necessary traffic between the resources.
    5. VNet Peering: Ensure that VNet peering is correctly set up between the VNets in Central US and East US 2.

    If these steps do not resolve the issue, you might need to engage Azure support for more detailed troubleshooting.

    0 comments No comments

  2. Durgesh Singh 80 Reputation points
    2025-11-18T18:31:02.1266667+00:00

    Options to fix without opening wide outbound access

    Option A — Enable the trusted-services exception for Azure AI Search (least intrusive)

    Azure AI Search supports a trusted services exception; the trusted list includes Microsoft.CognitiveServices (Azure OpenAI). Enabling this allows trusted Microsoft services to call Search despite firewall rules. This often fixes RAG scenarios (OpenAI ↔ Search).

    Pros: Minimal configuration change, no code rewrite.

    Cons: It's an exception (broadly "trusted Microsoft services") — not pure private-only.

    Docs: Configure network access / trusted service exception.

    When to use: If you accept a minimal exception that allows Azure AI services to talk to Search.

    Option B — Create cross-region private endpoints + correct DNS & peering (medium)

    You can create a Private Endpoint for the OpenAI resource in the same VNet/region your Search (or your VNet) lives in. Azure allows the private endpoint (the NIC) to be in the same region/VNet even if the backend service is in another region — but DNS and routing must resolve the OpenAI FQDN to that private IP. Ensure:

    Private DNS zone for the OpenAI service is created and linked to the VNet.

    No duplicate/private DNS entries conflict.

    If Search is in a different VNet, use VNet peering and link the private DNS zone to the peered VNet or use conditional forwarding.

    Pros: Keeps traffic private.

    Cons: DNS/peering is fiddly across regions; some PaaS service-to-service flows still expect a regional service endpoint and may not originate from your VNet in a way you can control. Docs: private endpoint and configure virtual network for AI services.

    When to use: If you want fully private traffic and are comfortable with cross-region private endpoint/DNS complexity.

    Option C — Re-architect: orchestrate calls from your VNet-hosted app (most secure, most control)

    Change the flow so your App Service (which has VNet integration and private endpoints) is the orchestrator:

    App receives chat request.

    App calls Search (private endpoint).

    App calls OpenAI (private endpoint).

    App combines responses and returns to client.

    This ensures Search never needs to call OpenAI; your app (in your VNet) does both calls and you control the network path and auth. Use Semantic Kernel / LangChain / your own orchestration code rather than Search doing LLM calls internally.

    Pros: Best control, avoids exceptions, no need to open Search's firewall.

    Cons: More development (move the RAG orchestration into your code), may increase app workload.

    Docs: RAG architecture note that orchestration can be external.

    When to use: If you require strict private-only networking and tight security posture.

    Option D — API Gateway / proxy in same region as Search

    Put API Management (or an internal gateway) in the same region / VNet and have it route/transform requests between Search and OpenAI. The gateway can have the required private endpoints and handle cross-region routing/credentials. This can be combined with Option B. Docs: multi-backend gateway pattern.

    When to use: If you want centralized control / policies without changing app code heavily.

    4) Recommended sequence to resolve (practical steps)

    Check Search diagnostic logs to confirm Search is attempting to call OpenAI (and what error it gets). If you see network/timeouts or 403 from Search → OpenAI, that points to the service-to-service flow. (If instead your app is failing to call Search, then fix VNet/DNS for app.)

    If Search → OpenAI is the failing path, try enabling the trusted services exception for Azure AI Search temporarily to confirm it fixes the chat scenario. If it works, you’ve proven it’s a network/trusted-service issue.

    If you can’t accept trusted services, move to Option B (private endpoint + DNS) ensure private DNS zone links to the VNet used by Search/AppService and that OpenAI hostname resolves to the private IP. Test connectivity from Search side (indexer test / diagnostics).

    If DNS/PE setup doesn’t solve it or is unsupported for your flow, implement Option C (orchestrator in your App Service) move the LLM call into your app and keep Search behind firewall. This is the cleanest security model.


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.