Imagine if your company hired a new contractor, handed them a master key to every server room in the building, let them use a shared anonymous login, and never checked what files they copied onto their personal USB drive. Your security team would shut the building down in five minutes.
Yet many teams deploy AI agents that exact way. They share a single master API key across ten apps, expose their AI endpoints to the public internet, and let agents query internal databases using overly broad permissions.
To get approval from an enterprise security team, your Microsoft Foundry architecture needs three layers of protection: Microsoft Entra Agent ID, Private Virtual Network (VNet) Isolation, and Runtime Guardrails.
Layer 1: Giving Every Agent Its Own Badge with Entra Agent ID
In Microsoft Foundry, API keys should be disabled in production (disableLocalAuth: true). Instead, authentication uses Microsoft Entra ID across two levels:
- Human & Developer Roles (Unified Foundry RBAC): Microsoft recently simplified the role names across the platform. You assign roles based on the exact job a person does:
Foundry Owner/Foundry Account Owner: Full control to create resources, configure networks, and manage billing.Foundry Project Manager: Can create projects, deploy Hosted Agents, and assign permissions to agent identities.Foundry User: Least-privilege data-plane role required to create prompt agents, manage toolboxes, and run inference calls.
- Entra Agent ID (Identity for the Agent Itself): Every deployed agent (especially Hosted Agents) receives its own platform-assigned Managed Identity in Microsoft Entra ID. It is completely separate from the human developer who created it. If your agent needs to read an Azure Storage container, you grant
Storage Blob Data Readerto that specific agent's identity, and nothing else.
Layer 2: Private Virtual Networks (Keeping Traffic Off the Internet)
In a production Standard Setup, no customer chats, uploaded PDFs, or search queries ever cross the public internet. You lock down the network using Private Endpoints and VNet Injection:
+-------------------------------------------------------------------------+
| Corporate Virtual Network (VNet) |
| |
| [ Agent Container Subnet ] ---> Private Endpoint ---> [ Cosmos DB ] |
| (Delegated to Foundry) ---> Private Endpoint ---> [ AI Search ] |
| ---> Private Endpoint ---> [ Blob Storage ]|
| |
| [ Outbound Firewall ] --> Allows only mcr.microsoft.com & Entra Login |
+-------------------------------------------------------------------------+
Join the conversation! Your thoughts help the community grow.