Domain 4: Secure, Govern, and Deploy Multi-Agent Solutions (Part 1 of 2)
This lesson covers 4 exam topics: Identity, Network Boundaries and RBAC, Authentication Flows for Agents, Secrets, Key Vault and Shift-Left Red Teaming, Multi-Intervention Guardrails. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.
1. Identity, Network Boundaries and RBAC
Central question: Who and what may reach each resource, over which network?
Facts
- Each Foundry agent gets an agent identity (Entra service principal); assign RBAC on downstream resources to it; audience must match the target service.
- Foundry roles: Foundry User, Foundry Project Manager, Foundry Owner, Foundry Account Owner (renamed from Azure AI ...); Foundry Agent Consumer to invoke agents.
- Hosted agents support network egress controls (preview) in the guardrail to allow only approved outbound destinations; private endpoints and disabled public access isolate Foundry.
- Key Vault Azure RBAC roles: Key Vault Secrets User (read secrets), Secrets Officer (manage secrets), Certificates Officer, Crypto User/Officer.
Exam traps
- Shared keys where identities work.
- Broad subscription-level roles for an agent.
- Ignoring outbound traffic from hosted agents.
2. Authentication Flows for Agents
Central question: Which authentication flow: impersonation, on-behalf-of, API key or OAuth?
Facts
- On-behalf-of (OBO) with hosted agents is application-managed: a trusted backend validates the user token, exchanges it for a delegated downstream token, and calls Foundry with its own workload token.
- Headers: Authorization (Foundry workload token, not forwarded to the container), x-client- (delegated downstream token, forwarded), x-ms-user-identity* (user object ID); tokens aren't interchangeable.
- Using x-ms-user-identity requires the custom data action UserIdentityImpersonation, not included in built-in roles, plus Foundry Agent Consumer for the backend identity.
- MCP: key-based (shared), Entra (agent identity or project managed identity; no secrets, built-in rotation), OAuth identity passthrough (per-user).
Design guidance
- Prefer Entra identities; use API keys only where a service supports nothing else, stored in Key Vault and rotated.
Exam traps
- Passing the user's token for your API straight to Graph. Exchange it with OBO.
- Trusting a client-supplied user ID header.
- API keys in agent instructions or code.
3. Secrets, Key Vault and Shift-Left Red Teaming
Central question: How are secrets managed, and how do you find risks before release?
Facts
- Key Vault: managed identity is best; when secrets are needed, rotate them: near expiry event to Event Grid 30 days before expiry triggers a function that creates a new secret version (Event Grid retries for two hours).
- Key auto-rotation policy creates new key versions on a schedule; rotate encryption keys at least every two years; Key Vault Crypto Officer manages rotation policy.
- AI Red Teaming Agent (PyRIT plus risk and safety evaluations): automated adversarial scans, Attack Success Rate (ASR), scorecards; use at design, development, pre-deployment and post-deployment (scheduled runs).
- Agentic red-team risks: prohibited actions, sensitive data leakage, task adherence, indirect prompt injection (XPIA); supports Foundry prompt and container agents; run in a non-production purple environment; cloud red-teaming inputs are redacted in results.
Exam traps
- Red teaming only after launch. Shift left.
- Static secrets with no rotation.
- Red teaming against production data.
4. Multi-Intervention Guardrails
Central question: Where do guardrails intervene in an agent's flow?
Facts
| Intervention point | Models | Agents (preview) |
|---|---|---|
| User input | Yes | Yes |
| Tool call | No | Yes (preview) |
| Tool response | No | Yes (preview) |
| Output | Yes | Yes |
- A guardrail is a named collection of controls; each control defines a risk, intervention points and an action (annotate, or annotate and block; agents support annotate and block).
- An agent's assigned guardrail fully overrides its model's guardrail; with no custom guardrail, the agent inherits the model deployment's guardrail; models default to Microsoft.DefaultV2.
- Risks include hate, sexual, self-harm, violence, user prompt attacks, indirect attacks, protected material, PII (preview); spotlighting and groundedness (preview) aren't supported for agents.
- Guardrails apply only to agents built in Foundry Agent Service.
Exam traps
- Input and output only while tools return injected content. Add tool response.
- Assuming model guardrails still apply after assigning an agent guardrail.
- Groundedness control on an agent. Not supported.
References
- AI-500 study guide — checked Oct 22, 2026
- Agent identity — checked Oct 22, 2026
- Guardrails overview — checked Oct 22, 2026
- Key Vault RBAC — checked Oct 22, 2026
- Use on-behalf-of flow — checked Oct 22, 2026
- MCP authentication — checked Oct 22, 2026
- AI Red Teaming Agent — checked Oct 22, 2026
- Secret rotation — checked Oct 22, 2026
- Key auto-rotation — checked Oct 22, 2026
Check your understanding
Restrict a hosted agent's outbound destinations?Show answerHide answer
Answer
Network egress controls.Agent reads the signed-in user's Graph profile?Show answerHide answer
Answer
OBO delegated token.Key metric of red teaming?Show answerHide answer
Answer
Attack Success Rate.Scan data an agent sends to a tool?Show answerHide answer
Answer
Tool call intervention point.Agent reads secrets only?Show answerHide answer
Answer
Key Vault Secrets User.