Lesson 2 of 3 Integration, Zero Trust and State Components

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.

True or false

One identity per agent

Exam skills 1.2.2

Check how agent identities support Zero Trust.

Log in to try this activity Interactive activities are free with an account.

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.

Preventing lateral movement between agents. A successful prompt injection against one agent should not reach other agents' tools or data. Each agent and tool has its own least-privilege identity with no rights to assign roles or read others' secrets; agents exposed to untrusted content are read-only and separate from write agents; agent-to-agent calls are authenticated and each agent validates the caller's token; networks are segmented with private endpoints; and short-lived tokens replace long-lived keys.
Separate identities and networks keep one compromise from spreading.
Select all that apply

Stopping lateral movement

Exam skills 1.2.2

Pick the controls that stop a compromised agent from reaching other agents' tools and data.

Log in to try this activity Interactive activities are free with an account.

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.

RequirementControlEvidence
Data must not traverse the public internetPrivate endpoints, public access disabledAzure Policy compliance report
Only authorized staff approve paymentsHITL approval with Entra ID groupsWorkflow audit log
Personal data retained no longer than 90 daysMemory TTL and retention policiesStore configuration and deletion logs
Every AI action attributablePer-agent identity and tracingSign-in logs and traces
Match the pairs

Mapping compliance requirements

Exam skills 1.2.2

Match each regulatory requirement with the control that implements it.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

Check yourself

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.