- Active agent version — Confirm the version that receives traffic is the one you want end users to interact with. By default, the agent automatically updates to the latest version, which means a newly created version is immediately served. If that isn’t what you want, pin traffic to a specific version.
- Protocols and authorization schemes — Make sure they match where and how your users interact with the agent. For example, an agent published to Microsoft 365 or Teams must have the Activity protocol enabled and use a BotServiceRbac or BotServiceTenant authorization scheme.
- Publish agents to Microsoft 365 Copilot and Microsoft Teams
- Publish an agent as an autopilot in Agent 365
If you’re migrating from the previous publishing model, see Migrate from Agent Applications to the new agent model.
Prerequisites
- A Foundry project with at least one agent version created
- Foundry User role on the Foundry project scope to create, manage, and invoke agents. Principals that only interact with agents (without creating or editing them) should use the Foundry Agent Consumer role instead.
- Foundry User role on the Foundry project scope to create, manage, and invoke agents. Principals that only interact with agents (without creating or editing them) should use the Foundry Agent Consumer role instead.
The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.
- Familiarity with Azure role-based access control (RBAC) for permission configuration
- Familiarity with Agent identity concepts in Foundry
- Install the required language runtimes, global tools, and Visual Studio Code extensions as described in Prepare your development environment
Code in this article uses packages that are currently in preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Understand the agent object model
Before you configure the endpoint, understand how projects, agents, agent versions, and the stable endpoint relate to each other.
Traffic routing
The agent’sversion_selector determines how traffic routes to agent versions. Two routing policies are available:
- Always use latest (default): 100% of traffic routes to the most recently created agent version. When the agent is published to Teams or Microsoft 365, creating a new version automatically updates what’s served in those channels.
- Pinned to a specific version: 100% of traffic routes to the agent version you select, called the active agent version. New versions don’t change what’s served until you update the selector.
Protocols
An agent can expose multiple protocols simultaneously:
To enable the A2A protocol on your agent, see Enable incoming A2A on a Foundry agent.
Authorization schemes
You can configure inbound authentication on the agent endpoint:
API key authentication isn’t supported. Use Microsoft Entra ID (Azure RBAC) to authorize callers.
Configure the agent properties
By default, the version selector routes 100% of traffic to the latest agent version, the Responses protocol is enabled, and authorization is set toEntra. You can change the version routing, enable more protocols, set authorization schemes, and add an agent card.
Select the active agent version
By default, the routing policy is Always use latest. To pin traffic to a specific version, update theversion_selector.
- Foundry portal
- REST API
- Python SDK
- In the Foundry portal, create an agent or open an existing agent.
- Expand the Publish dropdown to see endpoint configuration options. Expected result: You see the available endpoints for your agent and the current version routing configuration. The endpoints are live from agent creation; no publish step is required to activate them.
- Select the version selector arrow and choose a specific version. Expected result: The stable endpoint routes 100% of traffic to the selected version. When pinned, creating new versions doesn’t change what’s served.
Enable protocols and authorization schemes
An agent can expose multiple protocols simultaneously. Configure protocols and inbound authorization on the agent endpoint.- Foundry portal
- REST API
- Python SDK
Updating protocols and authorization schemes isn’t yet configurable in the Foundry portal. Use the REST API or Python SDK.
Add an agent card
An agent card surfaces details and capabilities to consumers, including for agent-to-agent (A2A) discovery.- Foundry portal
- REST API
- Python SDK
Adding an agent card isn’t yet configurable in the Foundry portal. Use the REST API or SDK.
Get your agent properties
To view your agent’s current properties—identity, protocols, authorization, and endpoint configuration—run:Security and privacy considerations
- Use least privilege. Grant users the minimum role they need. For example, create custom roles that separate agent creation permissions from agent invocation permissions.
- Don’t embed access tokens in source code, scripts, or client applications. Use the Microsoft Entra authentication flow appropriate for your app.