Share via


Deploy your agent to Azure manually

Running an Agent on Azure requires:

This document covers deploying an agent you created to Azure and Teams or M365.

If you haven't created an agent yet, start with Create an agent with the Agents SDK.

Publish your agent to a web app

An SDK agent is a webapp. Any of the methods you'd use to deploy a webapp to Azure apply for an agent.

  • ZipDeploy to an App Service
  • VS Publish to an App Service or Container
  • Other container deployments supported by Azure
  • Agents Toolkit

Important

If you are using an App Service and either Federated Credentials or User Managed Identity, you will need to add that identity under Settings then Identity.

In any case, after your agent code is deployed, it will have an endpoint, such as example.azurewebsites.net.

Navigate to your Azure Bot resource and under Configuration change the Messaging endpoint to https://{yourwebsite}/api/messages.

Test in Web Chat

To see your message in web chat, select Test in Web Chat in your Azure Bot resource and send messages to your agent.

Prepare your Teams and Microsoft 365 Copilot manifest

For Microsoft Teams and Microsoft 365 Copilot, you need to create and upload a manifest. It is not possible to provide a manifest example that covers all Teams or M365 needs. Teams features require specific manifest content.

These steps provide an overview of a basic "chat" style Teams agent.

  1. Create an empty folder in your project
  2. Copy of the contents of Teams manifest files
  3. Open manifest.json to edit:
    • Replace with your ClientId of the Azure Bot everywhere you see the placeholder string <<AAD_APP_CLIENT_ID>>
    • Replace <<BOT_DOMAIN>> with your Agent endpoint.
    • Zip up the contents of the folder to create a manifest.zip with the contents:
      • manifest.json
      • outline.png
      • color.png

Deploy to Microsoft 365

  1. Your Azure Bot should have the Microsoft Teams channel added under Channels.

  2. Navigate to the Microsoft Admin Portal (MAC). Under Settings and Integrated Apps, select Upload Custom App.

  3. Select the manifest.zip created in the previous section.

  4. After a short period of time, the agent shows up in Microsoft Teams and Microsoft 365 Copilot.