Skip to content

Microsoft Teams connector

The Teams connector connects a bot to Microsoft Teams, with the Bot Framework REST API.

Prerequisites

  • A Microsoft 365 tenant where custom apps can be uploaded in Teams
  • An Azure subscription, to register the bot in Azure Bot Service
  • A public HTTPS URL for the bot

Configuration

  1. Register a bot in the Microsoft Bot Framework / Azure Bot Service, to get an App ID and a password.
  2. In Tock Studio, create a Teams connector in Settings > Configurations:

    Field Description
    appId App ID of the bot in the Bot Framework / Azure Bot Service
    password Password (client secret) of the bot
  3. Set the messaging endpoint of the bot to the URL of the connector, for instance https://<bot-host>/io/<namespace>/<bot>/teams.

  4. Add the bot to Teams (see upload your app in Teams).

To test a bot running locally, expose it with a secure tunnel (for instance ngrok).

The timeouts of the calls to Microsoft are set by tock_microsoft_request_timeout and tock_teams_request_timeout_ms (see Configuration).

Cards

In addition to texts, the connector supports the following cards:

  • action card (buttons): teamsMessageWithButtonCard(...),
  • hero card (image, text and buttons): teamsHeroCard(...),
  • carousel of cards: teamsCarousel(...).
Chat with Tock
×