Skip to content

Microsoft Teams Bot

Microsoft 365 Teams is a collaborative communication platform that combines chat, video conferencing and file sharing. This app lets Blackbird participate in Teams conversations as a bot: it sends and replies to messages under its own identity rather than on behalf of a signed-in user.

Before you can connect you need to make sure that you have a Microsoft 365 account.

You also need to install the Blackbird bot in Microsoft Teams. Downloadblackbird-teams-bot.zip from this link, then:

  1. In Teams, go to Apps (the + icon in the left sidebar) → Manage your appsUpload an appUpload a custom app.
  2. Select the downloaded .zip file.
  3. Use the Add dropdown to choose Add to a team or Add to a chat and select every team or chat where the bot should send messages.

Note: If Upload a custom app isn’t shown, your Teams administrator has disabled custom app uploads. Ask them to enable it or to upload the package for your whole organization via Teams admin center → Teams appsManage appsUpload new app.

The bot can only post to conversations it belongs to.

If you want to use a custom Azure application for authorization, you should do the following:

  • Go to Azure → App registrationsNew registration.
  • Enter the name of your application and choose the supported account types. Click Register.
  • Go to ManageAPI permissions and select the required scopes:
    • If you don’t need to manage channel messages, select the following: offline_access User.Read User.ReadBasic.All Team.ReadBasic.All Channel.ReadBasic.All Chat.Read Files.Read.All Files.ReadWrite.
    • If you need to manage channel messages, select the above permissions + the ChannelMessage.Read.All scope.
  • Go to ManageAuthentication and click Add a platform. Choose Web and enter this redirect URI: https://bridge.blackbird.io/api/AuthorizationCode
  • Go to ManageCertificates & secrets and click New client secret. Enter a description (optional) and set the expiration time. Copy the created secret value, as you won’t be able to see it again.
  • Go to Overview and copy the Application (client) ID and Directory (tenant) ID. Use these values to register your connection in Blackbird.
  1. Under Channel messages scope required specify Yes if you want to use webhooks and/or actions for channel messages and No if not.
  2. Click Authorize connection.
  3. Follow the instructions that Microsoft gives you, authorizing Blackbird.io to act on your behalf.
  4. When you return to Blackbird, confirm that the connection has appeared and the status is Connected.

Connecting using OAuth2

  1. Under Channel messages scope required specify Yes if you want to use webhooks and/or actions for channel messages and No if not.
  2. Enter the Application (client) ID, Directory (tenant) ID and Client secret obtained from your custom Azure app.
  3. Follow the instructions that Microsoft gives you, authorizing Blackbird.io to act on your behalf.
  4. When you return to Blackbird, confirm that the connection has appeared and the status is Connected.

Connecting using Azure app

Note: Every action requires a Bot service url. Map the Service url output from an event when the action follows a trigger.

  • Reply to message in channel. Post a reply to an existing message in a channel
  • Send message to channel. Post a new message to the specified channel
  • Download files attached to channel message. Download files attached to a channel message
  • Reply to message in chat. Post a reply to an existing message in a chat
  • Send message to chat. Post a new message to the specified chat
  • On bot mentioned in channel
  • On bot mentioned in chat

Do you want to use this app or do you have feedback on our implementation? Reach out to us using the established channels or create an issue.