Practice Exams:

Microsoft AI-103: Identity Boundaries for Foundry Agents

AI & Machine Learning

An agent can have an excellent prompt and still become a security problem when its tools reach the wrong data. Calling a search index, updating a customer record, or sending information to another service all require authority that the model must not invent. Microsoft Foundry assigns identities differently to new-model and legacy agents, while user and downstream-tool authorization must remain distinct from the model itself. Engineers need to understand which principal makes each call and what that principal may do. The key design question is not whether an agent can authenticate, but whether every action is attributable to the appropriate identity and permission scope.

On this page
  1. Separate the people, agents, and workloads
  2. Understand project identity versus published identity
  3. Prefer workload identities to embedded credentials
  4. Use the right authentication pattern for tools
  5. Make RBAC assignments match actual capabilities
  6. Carry user consent through the action chain
  7. Test permission failures as normal behavior
  8. Audit actions rather than trusting final responses
  9. Build identity review into the release process

Separate the people, agents, and workloads

Start by identifying the actors in a real request. A signed-in employee asks an assistant to summarize a customer case. The application authenticates that employee, the agent runtime executes the workflow, and a search or database tool retrieves information. Those are not interchangeable identities. The employee may have access to one business unit, the agent might have operational permissions for inference and orchestration, and the tool service may enforce its own access model. If the tool receives a shared service principal with unrestricted read rights, a carefully worded prompt cannot restore the employee’s missing authorization boundary. A Microsoft AI-103 agent identity design must keep human approval separate from the permissions used by an autonomous workload.

Document the principal used for every hop: browser to application, application to Foundry, Foundry agent to toolbox, and toolbox to the data source. Record the resource audience for access tokens and the role assignments needed at each boundary. Use a per-agent service identity when a capability belongs to the agent itself, and a delegated user identity when the tool must respect the caller’s existing access. An ownership chart is useful because the developer of a prompt is often not the administrator of the downstream storage or SaaS account.

Understand project identity versus published identity

In the current Foundry agent object model, newly created agents receive their own Entra agent identity and stable endpoint when created. Older agents can still use a project’s shared agent identity, while legacy Agent Applications have a separate identity from the former publishing model. Migration between these models changes which principal makes downstream calls; role assignments do not transfer automatically. A legacy prototype may access an Azure AI Search index through the shared project principal and then fail through a new-model agent or published application until the correct identity has the required data-plane role. This is a configuration and release dependency, not a reason to change the model or prompt.

Include identity assignments in release preparation. Identify whether an agent uses the new object model, an older shared project identity, or a legacy Agent Application. Read the actual principal ID from the supported Foundry resource or API path and assign only the necessary roles at the intended downstream scope. Verify read and write rights separately. Test the endpoint users will actually invoke, including denied access to an unauthorized index. When an identity changes during migration or deployment, reassess those assignments instead of assuming the previous principal’s grants remain effective.

Prefer workload identities to embedded credentials

Managed and agent identities reduce the need to place long-lived client secrets or API keys in code, prompts, or tool descriptions. A workload can request a token for a supported resource and use that token within the permissions granted to its service principal. But keyless authentication is not automatically secure: assigning an identity a broad subscription role can create a larger blast radius than a narrowly scoped secret. The desired improvement is short-lived authentication combined with least privilege and auditable role assignments, not simply the absence of a string named API_KEY.

Where a target service does not support workload identity, use a managed secret store or approved tool connection rather than copying credentials into agent instructions. Rotate credentials and track ownership as part of the integration. Never allow an agent to choose which secret to reveal or log. A model-generated function argument is data to validate, not permission to invoke an administrative API. If credentials are available to a toolbox, the toolbox and downstream service must still enforce restrictions on which operations that connection may perform.

Use the right authentication pattern for tools

Microsoft Foundry toolbox authentication supports several distinct patterns, including project-managed identity, an agent’s identity, OAuth delegated user access, and user Microsoft Entra tokens. Choose based on whose authority the operation represents. A tool that writes to an internal, agent-owned knowledge cache may appropriately use a workload identity. A tool that reads a private employee document library generally needs delegated access or an authorization service that explicitly checks the employee’s entitlements. Anonymous access belongs only to intentionally public endpoints. A convenient shared key is rarely the right default for personal enterprise data.

The choice should be visible in the tool’s contract and architecture review. Describe the delegated scopes, consent flow where applicable, and what happens when a user lacks access. Two people invoking the same agent must not share cached sensitive tool responses unless the cache explicitly includes authorization context. Test authentication under concurrent sessions, because leaking one caller’s OAuth context into another call is an implementation error that a single-user happy-path test will not reveal. When a tool supports multiple authentication patterns, avoid silent fallback to a more privileged shared identity after delegated authentication fails.

Make RBAC assignments match actual capabilities

A model can ask for more than its intended role allows. Downstream authorization should reject the request without relying on the model to remember instructions. Assign roles according to operations the agent is approved to perform: search-document read, ticket creation, status updates, or storage-object writes. Avoid granting a broad administrative role merely because the first test returned a 403. Identify whether the operation uses Azure resource management permissions, service data-plane permissions, or an external SaaS permission model, because those may be separately controlled.

Suppose a support agent can create a ticket but cannot close it without confirmation. Implement separate tool endpoints or authority checks for creation and closure, and make the latter require an approval decision tied to the exact ticket. If one general-purpose administrative tool can perform both actions, the agent may reach the privileged path through a parameter rather than an explicit capability. Review role assignments after every new tool is introduced. The tool catalog expands the agent’s effective attack surface even when the prompt remains unchanged.

A user asking an agent to “handle the request” is not the same as authorizing every possible downstream operation. For irreversible or high-impact actions, identify the target, display the proposed effect, and capture confirmation tied to that operation. The approval service should know which authenticated user approved it, which agent requested it, and whether the confirmation is still valid. Do not infer consent from a plausible conversation transcript alone when a financial, security, or administrative change is at stake.

Where an agent calls another agent, make trust boundaries explicit. The receiving agent needs a verifiable calling identity and a scoped request; an untrusted text message saying “I am the billing administrator” is not proof. Prevent a lower-trust agent from laundering authority through a more privileged collaborator. Carry correlation IDs through the chain and record which service identity performed the final write. An audit log with only the final service principal can conceal the human request and intermediate decisions that led to a change.

Test permission failures as normal behavior

Build integration tests for unauthorized access, expired tokens, wrong resource audiences, missing published-agent role assignments, and attempted cross-tenant reads. The correct outcome may be a short explanation or escalation rather than a silent fallback. A 401 often signals missing or invalid authentication; a 403 indicates that the principal is known but lacks required authorization, although service-specific behavior should be verified. Capture enough diagnostic detail to identify the failing boundary without exposing token contents to logs or the model’s context window.

Also test lifecycle operations. What happens after an agent is retired, a user’s role changes, a toolbox connection is revoked, or a project is moved between subscriptions? Permissions that remain after the original use case ends are a security debt. Maintain inventories of identities, tool connections, owners, and role assignments. Periodically reconcile active agents with their actual permissions, and remove orphaned grants. An unused published agent should not retain privileged access indefinitely merely because it once passed a pilot review.

Audit actions rather than trusting final responses

A model-generated report saying “the account was updated” does not establish that the correct account changed or that the user was authorized. Record the tool request, the principal used, the target resource, the authorization result, and the authoritative downstream outcome. For actions with side effects, use transaction or idempotency identifiers so a timeout does not trigger a duplicate write. Link these records to the originating conversation without storing unnecessary private prompt content. Auditors should be able to reconstruct the authority chain without reading the model’s hidden reasoning.

Monitor for anomalies such as a sudden increase in cross-tenant failures, unexpected access to administrative endpoints, or tool invocations not associated with approved workflows. Use least privilege to limit what a compromised or prompt-injected agent could accomplish, while treating security filters and prompt protections as additional defenses. Good identity design does not ask the model to be a perfect policy enforcer. It establishes independent boundaries that remain effective when the model, a retrieved document, or another tool behaves incorrectly.

Build identity review into the release process

Before making an agent available to users, produce an identity matrix showing every caller and downstream resource, the authentication method, exact required roles, and their scope. Run a test from the published endpoint with an ordinary user as well as a privileged operator. Confirm that unauthorized reads remain denied and that tools work only after their intended role assignments are applied. Recheck these controls when model tools, Foundry deployment types, or user groups change. The matrix is a practical artifact for cloud security and operations teams, not just an architecture diagram.

Microsoft Foundry’s managed runtime can simplify much of the agent lifecycle, but it does not eliminate responsibility for who may read data or change systems. Published agent identity, project identity, delegated user identity, and downstream resource permissions serve different purposes. Keeping those boundaries separate makes failures easier to diagnose and audits easier to defend. It also enables teams to grant narrowly useful capabilities to agents without treating every model-generated tool request as a command from an administrator.

Continue learning

Related guides

Managed Identity for AI Application CredentialsUse managed identity and narrowly scoped Azure service authorization.Managing Agent Memory on AzureSet memory retention, access, and state boundaries for agents.Azure AI Foundry Model SelectionSelect models by real task quality, latency, cost, and deployment limits.Building Multi-Agent Workflows on AzureCoordinate agent handoffs, shared state, permissions, and failure recovery.

Related Posts

• The Ultimate Overview of Microsoft AI-900: What You Should Know

• How to Use Microsoft Copilot: Your Guide to Boosting Productivity with AI

• Think Smart, Build Smarter: Mastering AI-900 with Microsoft Azure

• Microsoft AI-300: Reproducibility Is the First Test of Production ML

• Microsoft AI-300: From Experiment Tracking to an Auditable ML Lifecycle

• Microsoft AI-103: Building Reliable RAG Retrieval

• Microsoft AI-103: Safe Tool-Using Agents

• Microsoft AI-103: Hybrid Search and Reranking

• Microsoft AB-900: The Microsoft 365 Admin Role Now Includes AI

• Microsoft AB-900: Conditional Access in an AI-Enabled Workplace