Integrations

Microsoft Teams

Connect a chatbot to Microsoft Teams so staff can ask it questions without leaving Teams. This is the most involved of the channels — it needs an Azure subscription and a few pieces that must line up. Pro plan only.

Teams is currently marked Coming soon. Unlock it first — see Testing the new integrations.

Before You Start

  • An Azure subscription — Azure Bot Service needs one even on the free tier.
  • Permission to register applications in your Microsoft Entra ID tenant. Many organisations restrict this.
  • Permission to upload a custom app in Teams, or an admin who can. Some tenants block sideloading entirely.
  • A chatbot in Aimy with at least one document uploaded.
If any of those three permissions is missing, stop here and get them first — the setup cannot be completed halfway and left in a working state.

Step 1 — Create an Azure Bot

1. Create the resource. In the Azure portal, search Azure Bot and click Create.

2. Fill in the basics. Give it a bot handle, pick your subscription and resource group, and choose the Free pricing tier (F0) for testing.

3. Choose the identity type. Select Multi Tenant and let Azure create a new Microsoft App ID. Then Review + create.

Step 2 — Get the App ID and password

4. Copy the App ID. Open the bot resource → Configuration → copy Microsoft App ID.

5. Create a client secret. On the same page click Manage next to the App ID — this opens the app registration. Go to Certificates & secretsNew client secret → set an expiry → Add.

6. Copy the secret VALUE immediately. Copy the Value column, not the Secret ID. Azure hides the value permanently once you navigate away, and there is no way to retrieve it — you would have to create another.

Step 3 — Connect in Aimy

7. Open the integration. Integrations → the Microsoft Teams card → pick your chatbot from the tabs.

8. Paste the App ID and secret, then click Connect.

Verify: Aimy requests a token from Microsoft before storing anything, so a wrong secret is caught here rather than at the first message. Copy the Messaging endpoint URL that appears.

Step 4 — Point Azure at Aimy

9. Set the messaging endpoint. Back in the Azure bot resource → Configuration → paste the URL into Messaging endpointApply.

10. Enable the Teams channel. Open Channels → click Microsoft Teams → accept the terms → Apply.

Verify: the Channels list should show Microsoft Teams as Running.

Step 5 — Get the bot into Teams

11. Open it in Teams. On the Channels page, use the Open in Teams link next to the Teams channel. That is the quickest route for testing and avoids building an app package.

12. If your tenant blocks that, you will need to build a Teams app package (a manifest plus two icons, zipped) in Developer Portal for Teams and upload it as a custom app. The manifest's botId must be the same App ID from Step 4.

Step 6 — Test it

13. Message the bot in Teams with a real question your documents can answer.

Verify: the answer should arrive in the chat. Then check Chat History in the admin panel, and the usage breakdown should show activity under Microsoft Teams.

How it works

Unlike the other channels, the Teams messaging endpoint is a public URL registered with Microsoft. Anyone can send a request to it. The only thing separating a genuine Teams activity from a forged one is the RS256 signature on the request, verified against Bot Framework's published keys and bound to your specific bot's App ID. That check runs before anything else touches the request.

Each Teams conversation is separate, and both the conversation ID and the region-specific service URL are stored — a live agent replying later needs both, and neither can be derived afterwards.

Troubleshooting

  • Bot does not respond at all. Confirm the messaging endpoint is saved in Azure and the Teams channel shows Running.
  • "Unauthorized" in the log. The App ID in Azure and the one in Aimy do not match, or the secret expired. Client secrets expire — check the date.
  • Cannot upload the custom app. Your tenant blocks sideloading. An admin must allow it, or publish through the org catalogue.
  • Worked, then stopped. Almost always an expired client secret. Create a new one and reconnect in Aimy.
The client secret has an expiry date you choose in Step 5. Whatever you pick, note it — when it lapses the bot stops with no other warning.