Lesson 1 of 4 Securing Multi-Agent Solutions

Securing Agents with Identity, RBAC and Network Boundaries

This lesson covers identity-based access, Azure RBAC for Foundry and related services, network boundaries and policy-based controls, which make every agent, tool and data store reachable only by the right principals over the right networks.

Learning outcomes

After completing this lesson, you will be able to:

  • Replace shared keys with managed identities and Entra ID tokens.
  • Assign Azure RBAC roles at the right scope.
  • Enforce network boundaries with private endpoints and Azure Policy.

Identity-based access

Identity-based access replaces shared keys with Microsoft Entra ID tokens. Agents and services use managed identities (system-assigned for a single resource, user-assigned when several resources or a stable identity across redeployments are needed) or Foundry agent identities. People sign in with their own accounts. Key-based authentication is disabled where possible: Foundry resources support disableLocalAuth, Azure AI Search supports role-based access only, and Storage supports disabling shared key access. Code uses DefaultAzureCredential in development and a specific credential such as ManagedIdentityCredential in production.

True or false

Keyless access

Exam skills 4.1.1

Check how identity-based access replaces keys.

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

Role-based access control

Azure RBAC assigns roles to principals at a scope: management group, subscription, resource group, resource or, for some services, a child item. Foundry has its own roles. Foundry User grants data-plane use of projects, agents and models; Foundry Project Manager also allows managing projects and assigning Foundry User; Foundry Account Owner manages the resource without data actions; Foundry Owner has full access. Related services have data-plane roles such as Search Index Data Reader, Storage Blob Data Reader, Cosmos DB Built-in Data Reader and Key Vault Secrets User.

The following table shows a least-privilege assignment for a typical agent solution.

PrincipalRoleScope
Orchestrator's managed identityFoundry UserThe Foundry project's resource
Retrieval agent's identitySearch Index Data ReaderThe search service (or index)
Tool function's identityKey Vault Secrets UserThe single secret it needs
DevelopersFoundry UserDevelopment project only
Deployment pipelineContributor and role assignment rightsThe environment's resource group
Match the pairs

Least-privilege role assignments

Exam skills 4.1.1

Match each principal with the least-privilege role it needs.

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

Network boundaries and access control policies

Private endpoints give a service a private IP address in a virtual network, and disabling public network access ensures traffic cannot arrive from the internet. Foundry supports private endpoints and, for Agent Service, virtual network injection so that agents reach private resources. Network security perimeters group PaaS resources and control traffic between them and the outside. Private DNS zones resolve service names to private addresses.

Access control policies complete the picture: Azure Policy denies or audits non-compliant configurations (for example, Foundry resources with public access or local authentication enabled), Conditional Access requires compliant devices or multifactor authentication for people, and document-level security filters restrict retrieval results.

Sort into groups

Network control or policy control?

Exam skills 4.1.1

Classify each control as a network boundary or an access control policy.

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

Locking down a solution

A health insurer's agent solution uses Foundry, Azure AI Search and Cosmos DB. Requirements: no traffic over the public internet, no keys anywhere, and a guarantee that future resources follow the same rules.

Use private endpoints with public network access disabled on all three services, virtual network injection for Agent Service, managed identities with data-plane roles instead of keys, and local authentication disabled. Azure Policy assignments that deny public access and local authentication enforce the rules for future resources. A firewall rule allowing only the company's IP ranges would still use the public endpoint.

Check yourself

How is public network access kept disabled on resources created later?

Show answer

With Azure Policy, which enforces the setting for new resources.

Exam Tips

Remember for the exam

  • Disable keys and use managed identities or agent identities with RBAC.
  • Foundry roles: User, Project Manager, Account Owner (no data actions), Owner.
  • Private endpoints plus public access disabled; Azure Policy enforces it for new resources.