← Home

Guide

Connect Microsoft Teams to Your AI Agent

Teams is the most corporate of the channels, and it shows in the setup. Budget an afternoon the first time, and check you have the Azure and Teams admin rights before you begin.

What You Need Before Starting

  • Permission to create an Azure Bot resource in your organisation's Azure subscription.
  • Permission to upload or approve a custom app in Teams. Many organisations lock this down, and no amount of configuration gets around it.
  • A public HTTPS endpoint. Teams pushes messages to your bot, so the agent has to be reachable from Microsoft's side.

That last point is the one that catches people running a hosted bot. Unlike Matrix or Signal, where the agent connects outward, Teams needs to reach in. Contact support and we will help you sort out a reachable endpoint for your instance.

Create the Azure Bot

  1. In the Azure portal, create an Azure Bot resource. Choose a multi-tenant or single-tenant app registration depending on whether the bot serves only your organisation.
  2. From the app registration, collect three values: the client ID, a client secret you generate, and your tenant ID.
  3. Set the messaging endpoint to your public URL with the messages path, for example https://your-endpoint/api/messages.
  4. Enable the Microsoft Teams channel on the bot resource.

While you are developing, a tunnel gives you a stable endpoint without deploying anything — the Microsoft devtunnel CLI, ngrok and cloudflared all work. Remember to update the messaging endpoint when you move to the real one.

OpenClaw Setup

Install the bundled plugin:

openclaw plugins install @openclaw/msteams

Then configure the channel with the client ID, client secret and tenant ID from the app registration, and point the messaging endpoint at your instance.

Text messages and direct-message attachments work. Sending files into a channel or group chat additionally needs a SharePoint site ID and the matching Graph permissions, so start with text and add that later if you need it. Polls are sent as Adaptive Cards.

Hermes Setup

Install the Teams extra, then run the guided setup and choose Microsoft Teams:

uv pip install -e ".[teams]"
hermes gateway setup

Or configure it directly:

TEAMS_CLIENT_ID=<your-client-id>
TEAMS_CLIENT_SECRET=<your-client-secret>
TEAMS_TENANT_ID=<your-tenant-id>

Restrict who can talk to the bot. In a corporate tenant an unrestricted assistant can be found by anyone in the directory, and every conversation costs you model usage.

Install It in Teams

Upload the app package in the Teams admin centre or through your organisation's app catalogue, then add the bot to a test channel or start a direct message with it. Mention it and see whether it answers.

Troubleshooting

  • The bot appears but never replies. The messaging endpoint is wrong or unreachable. Check Azure is pointing at a URL that is actually live right now — expired tunnels are the usual culprit.
  • Authentication failures. The client secret has expired, or the tenant ID does not match the registration type you chose.
  • It works in direct messages but not in channels. In a channel the bot generally needs an explicit mention.
  • You cannot upload the app. That is an organisational policy on custom apps, and your Teams administrator has to allow it.
  • File sending fails in a group chat. That path needs the SharePoint site ID and Graph permissions.

Need a Hand?

Contact support from your dashboard. We can configure the agent side and help with the endpoint — the Azure resource and the Teams app approval have to come from someone with admin rights in your organisation.