The Simplest Way to Make Azure App Service and Vertex AI Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use azure app service and vertex ai to run web apps that call machine learning models. The Azure app hosts the web code, while the Google service runs model requests and returns results. This cross-cloud setup lets teams keep their current web stack while adding strong AI features. You do not need to move your whole web app to a new cloud provider. Instead, the web app sends requests across the network to the model endpoint. Good setup requires clear identity rules, safe network paths, an

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use azure app service and vertex ai to run web apps that call machine learning models. The Azure app hosts the web code, while the Google service runs model requests and returns results.

This cross-cloud setup lets teams keep their current web stack while adding strong AI features. You do not need to move your whole web app to a new cloud provider. Instead, the web app sends requests across the network to the model endpoint. Good setup requires clear identity rules, safe network paths, and strict data checks.

How azure app service and vertex ai share identity and data

Moving data between two clouds starts with a trust link between both platforms. Your Azure web app needs a safe way to log in to Google Cloud. The best method uses workload identity federation instead of static service account keys.

First, you turn on a managed identity for your Azure web app. This gives the app an identity token from Azure Active Directory. Next, you set up a workload identity pool inside your Google Cloud project. You tell the pool to trust tokens from your Azure tenant and app ID.

When the web app runs, it requests a local token from Azure. It sends this token to Google Cloud to trade it for a short-lived Google token. The app then uses that Google token to call the model endpoint.

Data flows over encrypted HTTPS connections from the web app to the model API. The app sends a prompt or data payload, and the model returns a response. You must watch the size of each payload to keep response times low.

Common failure modes and how to scope roles and network paths

Many teams make mistakes when they first link these two cloud platforms. The most common risk is downloading a static JSON key from Google Cloud. Teams often paste this long-lived key into the Azure app settings. If someone leaks that key, an attacker can call your models from anywhere.

Service-to-Service Authentication + Azure RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another common issue is giving the service account a broad project role. A broad role lets the web app read storage buckets or change model settings. You should create a custom role or pick a minimal predefined role. The app only needs permission to invoke the specific model endpoint it uses.

Unlogged requests also create huge blind spots for security and finance teams. If you do not log model calls, you cannot track high bills or bad prompts. You should turn on audit logs in both cloud platforms to track every call. Also, check that prompts do not carry raw emails, phone numbers, or card numbers. Masking rewrites matched fields in results and prompts to keep sensitive user data safe.

Network paths between two public clouds also need strict rules and limits. By default, calls from Azure to Google travel over the public internet. For tighter security, teams set up a virtual network link or a private VPN tunnel. You must place the Azure app inside a virtual network to use private routing. Then, you route traffic through a private link to reach Google APIs safely.

Keeping cross-cloud model calls fast and reliable

Cross-cloud calls add extra network hops between your users and the AI model. Pick regions in both clouds that sit close to each other on the map. For example, pair an Azure East US app with a Google US East model.

You should also set clear timeout limits on your web app HTTP client. Model calls can take several seconds when generating long text responses. Use connection pooling in your web app so it reuses existing TLS links. This simple step cuts down the time spent setting up new network sessions.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How do I avoid storing Google keys in Azure App Service?

Use Azure managed identities paired with Google Cloud workload identity federation. This setup lets Azure trade its native token for a short-lived Google token at runtime.

How can I reduce latency between Azure App Service and Vertex AI?

Deploy your Azure web app and your Google model endpoint in the same geographic city. Reuse HTTP connections in your app code to skip repeated TLS handshakes.

What permissions does my Azure app need in Google Cloud?

Grant the mapped Google service account only the permission required to run predictions. Never assign broad editor or owner roles to an external web app identity.

The query runs. The emails stay hidden.