The core problem this preview solves is "configuration drift by developer convenience." Even with generally available runtime egress proxies in place, individual teams could previously deploy a hosted agent with no egress policy attached, or with a policy set to Allow by default, unless a human reviewer caught it. Central governance shifts that verification into Azure Policy, allowing administrators to audit existing configurations and block noncompliant deployments across subscriptions and resource groups.
Separating Runtime Egress Controls From Governance
To understand what is actually in preview—and what is already production-ready—it helps to separate the two layers Microsoft is building around Foundry hosted agents:
- Runtime Network Egress Controls (Generally Available): Hosted agents run customer-provided code inside managed, per-session VM-isolated sandboxes. Egress rules live inside a Responsible AI (RAI) policy (
Microsoft.CognitiveServices/accounts/raiPolicies), configured via the stable2026-09-01API version, and are enforced by an external proxy outside the agent's execution environment. OnlyTransformheader-modification rules and secret-backed header references (secretRef) remain in preview at this layer. - Central Azure Policy Governance (Public Preview): This is the new governance layer. Rather than inspecting every live HTTP call, Azure Policy evaluates the configurations developers write—both when they author RAI egress policies and when they publish new hosted-agent versions.
There are clear scope boundaries here that enterprise architects need to keep straight. Azure Policy egress governance applies exclusively to managed hosted agents in Microsoft Foundry. It does not govern standard prompt agents or base model deployments. (Prompt agents using the Microsoft Copilot harness in preview can use runtime egress controls, but they are excluded from this Azure Policy governance integration.) Additionally, Microsoft noted at Ignite 2026 that teams planning to deploy Foundry's agent runtime on their own Azure Kubernetes Service (BYO-AKS) clusters will see separate documentation rather than relying on this managed-hosted-agent workflow.
Even the regional footprint reflects a fast-moving rollout. When Microsoft introduced the Azure Policy governance preview at Ignite 2026, it noted the capability was starting in three regions—Canada Central, Korea Central, and Spain Central—which earlier snapshots of Microsoft Learn also reflected. Current Microsoft Learn documentation now lists six preview regions: Brazil South, Canada Central, Korea Central, Norway East, Southeast Asia, and Spain Central. Importantly, those regional preview limits apply only to the Azure Policy governance integration, not to runtime egress enforcement itself.
Inside the Four Built-In Azure Policy Definitions
To close the loop between policy authors and agent developers, Microsoft splits governance across four built-in definitions under the Cognitive Services category. Three operate at the Azure Resource Manager control plane (mode All), while one operates at the data plane (mode Microsoft.CognitiveServices.Data).
| Definition Display Name | Policy ID | Plane & Mode | What It Governs |
|---|---|---|---|
| Azure AI Services RAI policies should enforce egress baseline and endpoint restrictions | 0cfd954d-079f-447f-91bf-89889e9d1de0 | Control plane (All) | Requires present RAI egress configs to use Enforced mode, default Deny, permitted actions, and approved source host/path scopes. |
| Azure AI Services RAI policy rewrites should target permitted destinations | 64a15c51-9797-4d6b-93a5-16b19e7de23b | Control plane (All) | Checks explicit and inherited Rewrite targets against valid syntax, permittedDestinations, and deniedDestinations. |
| Azure AI Services RAI egress headers should use safe operations, references, and HTTPS | 29be091c-88f9-419b-8ad9-82ce5dc452d3 | Control plane (All) | Requires safe header operations, reference-based values (managed identity or secret references instead of literals), and HTTPS for credential-bearing rewrites. |
| Microsoft Foundry hosted agents should enforce resolved RAI egress restrictions | d279dbb1-e60e-4ca0-8c2f-cc7a0f46166b | Data plane (Microsoft.CognitiveServices.Data) | Evaluates hosted agents' resolved RAI egress settings at Microsoft.CognitiveServices.Data/accounts/projects/agents, enforcing baseline, destination, credential, and routing-header protections. |
Why do you need all four? Because the control-plane definitions only inspect RAI egress policies that already exist—they will not stop a developer from deploying a hosted agent that omits an RAI egress policy altogether. Only by assigning the data-plane definition alongside the three control-plane definitions can an organization mandate that every hosted agent version resolves to a compliant egress configuration.
Stricter Guardrails for Credentials and Routing Headers
One of the sharpest security additions in the data-plane and header definitions involves how agents authenticate to external APIs. While the runtime proxy supports static header strings, organizational governance can reject literal header values and require Set or Insert operations to pull from a managed identity (managedIdentityRef.resource with an explicit audience) or a Key Vault secret reference (secretRef, currently in preview).
Furthermore, the data-plane definition blocks Set or Insert operations on sensitive HTTP routing headers—specifically Host, :authority, :path, :scheme, X-Rewrite-URL, :X-Rewrite-URL, X-Forwarded-Host, Forwarded, and X-Original-Host (evaluated case-insensitively and exactly, while Remove remains allowed). For credential-bearing Transform rules, it also rejects numeric or IP-like source hosts to prevent bypassing normal HTTPS hostname checks, and requires credential-bearing Rewrite rules to explicitly use HTTPS.
Operational Reality Check: Quirks Admins Need to Know
On paper, assigning a few built-in policies sounds straightforward. In production Azure environments, however, several subtle behaviors can trip up even seasoned cloud architects.
1. Assignments Do Not Create or Attach Guardrails
Assigning an Azure Policy definition sets a compliance rule; it does not automatically provision an RAI policy or bind it to an agent. Developers still need to define their egress rules (up to 480 ordered rules per policy, evaluated top-to-bottom with fail-closed behavior and automatic allow-listing for foundational runtime domains) and reference the full Resource Manager resource ID via rai_config.rai_policy_name or raiPolicyName in azure.yaml.
2. Scope Selection Can Leave Blind Spots
Because RAI policies live at the Foundry account level (Microsoft.CognitiveServices/accounts/raiPolicies) while hosted agents live under projects, assigning policies strictly at a project scope can miss account-level RAI policies outside that project's hierarchy. Administrators should assign the definitions at a resource group, subscription, or management group scope that encompasses both the Foundry account and its projects.
3. Three Look-Alike Settings Do Very Different Things
It is remarkably easy to confuse Azure Policy governance controls with runtime proxy controls:
- Azure Policy
effect(Audit,Deny,Disabled): Controls whether a noncompliant authoring operation (creating an RAI policy or agent version) is logged as noncompliant or rejected. Setting this toAuditdoes not put the agent's runtime egress proxy intoAuditmode. - Azure Policy
enforcementMode(Default,DoNotEnforce): Controls whether the policy assignment enforces its configured effect at all. - RAI
egressPolicy.mode(Audit,Enforced): Controls whether the runtime proxy merely logs would-deny outbound requests or actively blocks them with an HTTP 403 response to the agent's network client. Even in runtimeAuditmode,TransformandRewriteactions still execute on live traffic.
4. Destination Parameters Have Sharp Edges
When populating permittedDestinations and deniedDestinations (capped at 100 entries per list in the current definitions), administrators must supply host, host/path, or host/path/*—never full URLs with schemes, ports, queries, or fragments. Leave permittedDestinations empty, and no traffic-permitting rules are allowed; an empty list does not mean "allow everything."
Watch out for case sensitivity and rule overlap, too. Hostnames are case-insensitive everywhere, and control-plane checks ignore path case, but data-plane checks treat permittedDestinations paths as case-sensitive while conservatively ignoring case when checking overlap with deniedDestinations. A broad Allow rule that overlaps a denied subtree will fail governance even if a narrower runtime Deny rule sits above it.
5. Propagation Delays and Non-Revocation
Saving a data-plane policy assignment—or flipping its effect from Audit to Deny—is not instantaneous. Microsoft advises waiting 30 to 60 minutes for data-plane assignment changes to propagate before testing or relying on enforcement, and notes that this window is planning guidance rather than a hard SLA or compliance-reporting deadline.
Just as critical: a tightened policy only blocks new noncompliant agent versions (greenfield evaluation). Background compliance scans will flag existing noncompliant versions (brownfield evaluation), but Azure Policy will not automatically repair old configurations or terminate active running agent sessions. Remediating an existing violation requires updating the configuration, publishing a compliant new agent version, and transitioning sessions cleanly.
Practical Deployment Sequence for IT Teams
For organizations testing this preview in one of the six supported regions, Microsoft recommends a disciplined, audit-first rollout:
- Assign in
Auditat a test scope: Assign all three control-plane definitions and the single data-plane definition (d279dbb1-e60e-4ca0-8c2f-cc7a0f46166b) to a test resource group containing your Foundry account and project, leavingeffectset toAudit. In the Azure portal, enter multiple destinations separated by semicolons (;) without JSON brackets; in Azure CLI parameter files, use standard JSON arrays. Do not enable a managed identity on these assignments—none is needed forAuditorDeny. - Wait and verify authoring separately from runtime: Allow 30 to 60 minutes for data-plane propagation. Test with a disposable RAI policy and genuinely new hosted-agent versions (submitting an unchanged definition can simply return an existing version rather than triggering a fresh admission check). Verify that compliant configurations pass while intentionally noncompliant ones (such as default
Allowor unapproved hosts) appear in compliance results. - Validate IaC and runtime telemetry: If you export templates with
az group export, verify that yourraiPoliciesresource specifies API version2026-09-01—older versions such as2026-07-01strip out theegressPolicyobject. Separately, confirm runtime behavior in Application Insights (traces | where message == "Network egress decision") and remember that HTTPS inspection injects a rotating infrastructure CA bundle (rotating roughly every 30 days) that clients should read from standard environment variables rather than pinning. - Flip to
Denyand retest: Once audit results match expectations, switch theeffectparameter toDeny, wait another 30 to 60 minutes for data-plane propagation, and confirm that noncompliant authoring writes are rejected with an Azure Policy error—remembering not to confuse an authoring rejection with the runtime proxy's HTTP 403.
The Bigger Picture for Enterprise AI Security
Central governance of hosted-agent outbound domains fills an obvious gap in Microsoft Foundry's security story. Moving egress enforcement outside the agent sandbox was step one; letting security teams enforce baseline rules centrally across an entire subscription is step two. Still, IT leaders should treat this preview as one layer in a defense-in-depth architecture rather than a silver bullet. Microsoft explicitly positions these guardrails as a complement to virtual network isolation and Azure Firewall, not a replacement, and customers remain responsible for the data-handling practices of whichever external endpoints they allow. Combined with proper network isolation, identity governance, and audit-first rollouts, however, Azure Policy egress governance gives enterprises a practical way to keep hosted AI agents on a tight, centrally audited leash.
References
- (In preview) Public Preview: Central governance of hosted-agent outbound domains in Foundry Agent Service Azure Updates · 2026-11-24T16:42:20Z
- Govern Microsoft Foundry hosted agent egress with Azure Policy (preview) - Microsoft Foundry | Microsoft Learn learn.microsoft.com
- Add guardrails to a hosted agent - Microsoft Foundry | Microsoft Learn learn.microsoft.com