Applying Zero Trust to Multi-Agent Solutions
This lesson maps the Zero Trust principles, verifying every request, granting only the access needed and limiting the damage of a breach, to agent components, where autonomous action and untrusted content make them especially important.
Learning outcomes
After completing this lesson, you will be able to:
- Scope a separate identity for each agent, including Microsoft Entra Agent ID.
- Prevent lateral movement between agents.
- Build a compliance control mapping for a regulated deployment.
Per-agent identity scoping
Each agent receives its own identity. Foundry agents can use agent identities in Microsoft Entra ID (Microsoft Entra Agent ID), and custom agents use user-assigned managed identities. Role assignments are made per identity at the narrowest scope. A shared service principal for all agents makes least privilege impossible, because the shared identity needs the union of every agent's permissions, and it makes audit logs unable to show which agent acted.
One identity per agent
Preventing lateral movement
Lateral movement is an attacker's progression from one compromised component to others. In an agent system, a successful prompt injection against one agent should not give access to other agents' tools or data. The following controls prevent lateral movement.
- Least-privilege role assignments per agent and per tool, with no permission to assign roles or read secrets beyond its own.
- Separation of read agents (exposed to untrusted content) from write agents.
- Network segmentation: private endpoints, disabled public access, separate subnets and network security perimeters.
- Authenticated agent-to-agent calls, with each agent validating the caller's token and claims.
- Short-lived tokens instead of long-lived keys.
The following diagram shows how a compromised agent is contained.

Stopping lateral movement
Compliance control mapping
Regulated deployments (finance, health, public sector) must show how each requirement is met. Compliance control mapping lists each requirement, the technical control that implements it and the evidence. Azure Policy enforces and audits configuration (for example, private endpoints required on Foundry resources). Microsoft Defender for Cloud shows regulatory compliance dashboards and AI threat protection. Microsoft Purview classifies data and records audit events for AI interactions. Diagnostic logs in Log Analytics are retained for the required period.
The following table shows example mappings.
| Requirement | Control | Evidence |
|---|---|---|
| Data must not traverse the public internet | Private endpoints, public access disabled | Azure Policy compliance report |
| Only authorized staff approve payments | HITL approval with Entra ID groups | Workflow audit log |
| Personal data retained no longer than 90 days | Memory TTL and retention policies | Store configuration and deletion logs |
| Every AI action attributable | Per-agent identity and tracing | Sign-in logs and traces |
Mapping compliance requirements
Containing a compromised agent
A penetration test shows that a web-research agent can be made, through instructions hidden in a web page, to call any tool that other agents in the solution use, because all agents share one managed identity with Contributor on the resource group.
The fix is per-agent identities with least-privilege roles: the research agent's identity gets no access beyond its search tool, write tools are assigned only to agents that never read untrusted content, and Contributor is removed. A guardrail on tool responses reduces the chance of injection succeeding, but only identity scoping limits the impact when it does.
Why should each agent have its own identity?
Show answer
With a shared service principal, compromising one agent gives access to everything the others can do. Separate identities with least privilege contain the damage.
Exam Tips
Remember for the exam
- One identity per agent; never a shared service principal.
- Lateral movement is stopped by least privilege plus segmentation.
- Compliance mapping links each requirement to a control and evidence.