|
1 | | -When you build an agent in Microsoft Foundry, it runs within the Foundry Agent Service infrastructure. To make your agent available in Microsoft Teams and Microsoft 365 Copilot, you need to publish it through a process that creates the necessary connections between your agent and Microsoft 365 services. |
| 1 | +When you build an agent in Microsoft Foundry, it runs within the Foundry Agent Service infrastructure. Publishing your agent promotes it from a development asset into a managed Azure resource with a dedicated endpoint, independent identity, and governance capabilities. While this module focuses on Microsoft 365 integration, understanding all available publishing destinations helps you choose the right approach for your scenario. |
2 | 2 |
|
3 | | -## How Foundry agents connect to Microsoft 365 |
| 3 | +## Understanding agent applications |
4 | 4 |
|
5 | | -Microsoft Foundry agents integrate with Microsoft 365 through Azure Bot Service. When you publish an agent, the system creates a bot resource that acts as the communication layer between your Foundry agent and Microsoft 365 surfaces like Teams and Copilot. |
| 5 | +When you publish an agent, Microsoft Foundry creates an **Agent Application** resource. This resource provides: |
6 | 6 |
|
7 | | -The publishing process handles several components automatically: |
| 7 | +- **Dedicated invocation URL**: A stable endpoint that remains consistent as you update agent versions |
| 8 | +- **Agent identity**: A distinct Microsoft Entra identity separate from your development project |
| 9 | +- **Governance capabilities**: Registration in the Entra Agent Registry for discovery and management |
| 10 | +- **User data isolation**: Inputs and interactions from one user aren't available to other users |
8 | 11 |
|
9 | | -- **Azure Bot Service**: Routes messages between Microsoft 365 and your agent |
10 | | -- **Microsoft Entra ID app registration**: Provides identity and authentication for your agent |
11 | | -- **Agent application**: Creates a stable endpoint and identity for your published agent |
12 | | -- **Microsoft 365 publishing package**: Packages your agent for distribution in Teams and Copilot |
| 12 | +The Agent Application acts as a routing layer that directs traffic to specific agent deployments. When you publish a new agent version, traffic automatically routes to the updated deployment without changing the public endpoint. |
13 | 13 |
|
14 | | -This architecture means users in Teams or Copilot send messages to the Bot Service, which forwards them to your Foundry agent. The agent processes the request and returns a response through the same path. |
| 14 | +## Available publishing channels |
15 | 15 |
|
16 | | -## Publishing approaches |
| 16 | +Microsoft Foundry agents can publish to multiple destinations. Each channel serves different use cases and audiences. |
17 | 17 |
|
18 | | -Microsoft provides two main approaches for publishing Foundry agents to Microsoft 365, each suited for different scenarios. |
| 18 | +### Microsoft 365 Copilot and Teams |
| 19 | + |
| 20 | +The primary focus of this module, Microsoft 365 integration enables your agent to appear within Teams and Copilot. Publishing to M365: |
| 21 | + |
| 22 | +- Creates an Azure Bot Service resource that routes messages between M365 and your agent |
| 23 | +- Generates a Microsoft 365 publishing package for distribution |
| 24 | +- Registers a Microsoft Entra ID application for authentication |
| 25 | +- Makes your agent discoverable in the Teams agent store |
| 26 | + |
| 27 | +This channel is ideal when your users already work in Microsoft 365 and you want to bring AI capabilities directly into their existing workflow. |
| 28 | + |
| 29 | +### Web application preview |
| 30 | + |
| 31 | +The web application preview provides a browser-based interface for demonstrating and testing your agent with stakeholders. This channel: |
| 32 | + |
| 33 | +- Requires no client installation |
| 34 | +- Provides instant sharing via URL |
| 35 | +- Works well for demos and user acceptance testing |
| 36 | +- Allows non-technical stakeholders to evaluate your agent |
| 37 | + |
| 38 | +Use the web preview when you need to showcase your agent before committing to a production deployment. |
| 39 | + |
| 40 | +### Stable API endpoint |
| 41 | + |
| 42 | +Every published agent exposes a stable REST API endpoint that enables programmatic access. The endpoint uses an OpenAI-compatible protocol, making it familiar to developers. This channel is useful when you want to: |
| 43 | + |
| 44 | +- Embed your agent in existing applications |
| 45 | +- Build custom client experiences |
| 46 | +- Integrate with automation workflows |
| 47 | +- Create scheduled or batch interactions with your agent |
| 48 | + |
| 49 | +The stable endpoint URL follows this pattern: |
| 50 | + |
| 51 | +`https://{accountName}.services.ai.azure.com/api/projects/{projectName}/applications/{applicationName}/protocols/openai` |
| 52 | + |
| 53 | +### Custom applications |
| 54 | + |
| 55 | +For deeper integration, you can embed your agent into existing applications using the stable endpoint and SDK integration. This approach provides: |
| 56 | + |
| 57 | +- Full control over the user interface |
| 58 | +- Integration with existing authentication systems |
| 59 | +- Custom conversation management |
| 60 | +- Branded experiences that match your application |
| 61 | + |
| 62 | +Custom application integration works well for software vendors who want to add AI capabilities to their products. |
| 63 | + |
| 64 | +### Azure Bot Service channels |
| 65 | + |
| 66 | +Through Azure Bot Service, your agent can connect to additional messaging platforms beyond Microsoft 365: |
| 67 | + |
| 68 | +| Channel | Description | |
| 69 | +|---------|-------------| |
| 70 | +| **Slack** | Reach users in Slack workspaces | |
| 71 | +| **Telegram** | Connect through the Telegram messaging platform | |
| 72 | +| **Twilio** | Enable SMS-based interactions | |
| 73 | +| **Facebook** | Integrate with Facebook Messenger | |
| 74 | +| **Line** | Connect to the Line messaging platform | |
| 75 | +| **GroupMe** | Enable group chat interactions | |
| 76 | +| **Direct Line Speech** | Support voice-based interactions | |
| 77 | +| **Email** | Enable email-based conversations | |
| 78 | + |
| 79 | +These channels require additional configuration through the Azure Bot Service after publishing your agent. Each channel has specific connection requirements and may need platform-specific credentials or app registrations. |
| 80 | + |
| 81 | +## How publishing works |
| 82 | + |
| 83 | +The publishing process transforms your development agent into a production-ready service. Understanding this process helps you troubleshoot issues and plan deployments effectively. |
| 84 | + |
| 85 | +When you publish from the Foundry portal: |
| 86 | + |
| 87 | +1. **Agent Application creation**: The system creates an Agent Application resource with a dedicated URL |
| 88 | +2. **Identity provisioning**: A distinct agent identity is created, separate from your project identity |
| 89 | +3. **Deployment creation**: A deployment is created that references your specific agent version |
| 90 | +4. **Channel configuration**: For M365 publishing, Azure Bot Service and Entra ID app registration are created automatically |
| 91 | + |
| 92 | +After initial publishing, you can update your agent and publish new versions. The stable endpoint remains consistent, so downstream consumers don't need to change their integrations. |
| 93 | + |
| 94 | +## Publishing approaches for Microsoft 365 |
| 95 | + |
| 96 | +This module focuses on Microsoft 365 integration, which offers two main approaches for publishing Foundry agents. |
19 | 97 |
|
20 | 98 | ### Direct publishing from Foundry portal |
21 | 99 |
|
22 | | -The most straightforward approach is publishing directly from the Foundry portal. This option handles all the infrastructure setup automatically and requires minimal configuration. You complete a publishing wizard that: |
| 100 | +The most straightforward approach is publishing directly from the Foundry portal. This option handles all the infrastructure setup automatically and requires minimal configuration. The publishing wizard: |
23 | 101 |
|
24 | 102 | 1. Creates an Azure Bot Service resource in your subscription |
25 | 103 | 2. Registers a Microsoft Entra ID application |
26 | 104 | 3. Generates a Microsoft 365 publishing package |
27 | 105 | 4. Prepares your agent for distribution |
28 | 106 |
|
29 | | -This approach is ideal when you want to: |
30 | | - |
31 | | -- Deploy quickly without writing additional code |
32 | | -- Test your agent in Teams or Copilot |
33 | | -- Publish to your organization or a small team |
34 | | -- Keep your agent logic entirely within Foundry |
| 107 | +This approach is ideal when you want to deploy quickly, test your agent in Teams or Copilot, or keep your agent logic entirely within Foundry. |
35 | 108 |
|
36 | 109 | ### Microsoft 365 Agents Toolkit |
37 | 110 |
|
38 | 111 | For complex scenarios, you can use the Microsoft 365 Agents Toolkit to create a proxy application that connects to your Foundry agent. This approach provides more control but requires additional development effort. |
39 | 112 |
|
40 | | -The Agents Toolkit is covered in more detail later in this module as an optional advanced topic. You might consider this approach when you need: |
41 | | - |
42 | | -- Custom single sign-on (SSO) implementation |
43 | | -- Advanced middleware or business logic between Teams and your agent |
44 | | -- Multi-environment deployment pipelines |
45 | | -- Detailed debugging and tracing capabilities |
| 113 | +The Agents Toolkit is covered in more detail later in this module as an optional advanced topic. Consider this approach when you need custom single sign-on (SSO), advanced middleware logic, multi-environment deployment pipelines, or detailed debugging capabilities. |
46 | 114 |
|
47 | 115 | ### Comparing the approaches |
48 | 116 |
|
49 | | -| Feature | Direct publishing from Foundry | Agents Toolkit | |
50 | | -|---------|-------------------------------|----------------| |
51 | | -| Setup complexity | Low - wizard-based | Higher - requires development | |
52 | | -| Tooling | Foundry portal | Visual Studio Code with extension | |
53 | | -| Bot Service provisioning | Automatic | Manual or automated via toolkit | |
54 | | -| Best for | Rapid deployment, testing, standard scenarios | Custom logic, SSO, managed infrastructure | |
| 117 | +| Feature | Direct publishing | Agents Toolkit | |
| 118 | +|---------|-------------------|----------------| |
| 119 | +| Setup complexity | Low | Higher | |
| 120 | +| Bot Service provisioning | Automatic | Manual or automated | |
| 121 | +| Best for | Rapid deployment, testing | Custom logic, managed infrastructure | |
55 | 122 | | Code required | None | Proxy application code | |
56 | 123 |
|
57 | | -For most scenarios, direct publishing from the Foundry portal provides everything you need. The Agents Toolkit becomes valuable when you have specific requirements that the standard publishing flow doesn't support. |
| 124 | +For most scenarios, direct publishing provides everything you need. |
58 | 125 |
|
59 | | -## Publish scopes |
| 126 | +## Publish scopes for Microsoft 365 |
60 | 127 |
|
61 | | -When publishing from the Foundry portal, you choose between two distribution scopes: |
| 128 | +When publishing to Microsoft 365, you choose between two distribution scopes: |
62 | 129 |
|
63 | 130 | ### Shared scope |
64 | 131 |
|
65 | | -Shared scope makes your agent available immediately without requiring administrative approval. The agent appears under **Your agents** in the Teams agent store. This scope is ideal for: |
| 132 | +Shared scope makes your agent available immediately without administrative approval. The agent appears under **Your agents** in the Teams agent store. Use this scope for personal testing, sharing with a small team via direct link, or pilot programs before broader rollout. |
66 | 133 |
|
67 | | -- Personal testing during development |
68 | | -- Sharing with a small team via direct link |
69 | | -- Pilot programs before broader rollout |
| 134 | +### Organization scope |
70 | 135 |
|
71 | | -With shared scope, only users you share the agent link with can discover and use your agent. |
| 136 | +Organization scope makes your agent available to everyone in your Microsoft 365 tenant under **Built by your org** in the agent store. This scope requires administrative approval in the Microsoft 365 admin center and compliance with your organization's app policies. Use this scope for production deployments intended for broad organizational use. |
72 | 137 |
|
73 | | -### Organization scope |
| 138 | +## Agent identity and permissions |
74 | 139 |
|
75 | | -Organization scope makes your agent available to everyone in your Microsoft 365 tenant. The agent appears under **Built by your org** in the agent store. This scope requires: |
| 140 | +When you publish an agent, the system creates a distinct agent identity separate from your development project identity. This distinction is important because: |
76 | 141 |
|
77 | | -- Administrative approval in the Microsoft 365 admin center |
78 | | -- Compliance with your organization's app policies |
| 142 | +- The agent authenticates to Azure resources using its own identity |
| 143 | +- Role-based access control (RBAC) permissions must be assigned to the published agent identity |
| 144 | +- Tools that access Azure resources need permissions reconfigured after publishing |
79 | 145 |
|
80 | | -Once approved, any user in your organization can find and interact with your agent. This scope is appropriate for production deployments intended for broad organizational use. |
| 146 | +If your agent uses tools that connect to Azure services like Azure AI Search or Azure Cosmos DB, grant the published agent's identity appropriate permissions. Development-time permissions on your project identity don't transfer automatically. |
81 | 147 |
|
82 | | -## Agent identity and permissions |
| 148 | +## Choosing the right channel |
83 | 149 |
|
84 | | -When you publish an agent, the system creates a distinct agent identity separate from your development project identity. This published agent identity is important to understand because: |
| 150 | +Consider these factors when selecting a publishing channel: |
85 | 151 |
|
86 | | -- The agent authenticates to Azure resources using its own identity |
87 | | -- Any role-based access control (RBAC) permissions must be assigned to the published agent identity |
88 | | -- Tools that access Azure resources need their permissions reconfigured after publishing |
| 152 | +| If you need... | Consider... | |
| 153 | +|----------------|-------------| |
| 154 | +| Integration with existing Teams/Copilot workflow | Microsoft 365 Copilot and Teams | |
| 155 | +| Quick demos for stakeholders | Web application preview | |
| 156 | +| Embedding in custom applications | Stable API endpoint | |
| 157 | +| Reaching users on third-party platforms | Azure Bot Service channels | |
| 158 | +| Full branding control | Custom application integration | |
89 | 159 |
|
90 | | -If your agent uses tools that connect to Azure services like Azure AI Search or Azure Cosmos DB, you need to grant the published agent's identity the appropriate permissions. The development-time permissions on your project identity don't transfer automatically. |
| 160 | +For enterprise scenarios where users already work in Microsoft 365, Teams and Copilot integration typically provides the best user experience. The remaining units in this module focus on this primary scenario while acknowledging that the same agent can be published to other channels as needed. |
91 | 161 |
|
92 | 162 | ## Prerequisites for publishing |
93 | 163 |
|
94 | | -Before publishing an agent to Microsoft 365, ensure you have: |
| 164 | +Before publishing an agent, ensure you have: |
95 | 165 |
|
96 | 166 | - **Azure AI Project Manager** role on your Foundry project (to publish agents) |
97 | 167 | - **Azure AI User** role on the agent application scope (to invoke published agents) |
98 | 168 | - An Azure subscription where you can create Azure Bot Service resources |
99 | 169 | - Permissions to register applications in Microsoft Entra ID |
100 | 170 | - The **Microsoft.BotService** resource provider registered in your subscription |
101 | 171 |
|
102 | | -Your Microsoft 365 tenant also needs to allow custom apps and bots for users to access your published agent. |
| 172 | +For Microsoft 365 publishing specifically, your tenant also needs to allow custom apps and bots for users to access your published agent. |
0 commit comments