Skip to content

Adapter - Microsoft Teams

This page describes version 2.0.5 of the adapter.

Overview

This adapter provides a way to send and parse received messages from Microsoft Teams by means of incoming and outgoing webhooks.

Prerequisites

In a Microsoft Teams channel, define both an incoming webhook and an outgoing webhook in order to use the "SendMessage" and "ParseMessage" commands respectively. This may require privileged access rights to the channel.

Sending messages to a Microsoft Teams Channel

The Microsoft Teams channel must have an incoming webhook configured to receive messages. Incoming webhooks are exposed HTTPS endpoints that accept JSON formatted cards.

The adapter's "SendMessage" command will build the card based on input properties and send it to the configured channel endpoint.

A complete guide on managing incoming webhooks can be found here.

Receive and parse messages from a Microsoft Teams Channel

The channel must have an outgoing webhook configured to send messages to an UIP webhook trigger. This will act as a bot.

Mentioning the webhook(bot) in the chat room initiates a request to the UIP trigger which links to a specific workflow. The "ParseMessage" command is used to interpret the raw message sent by Microsoft Teams and provide a structured object.

A complete guide on managing outgoing webhooks can be found here.

In order to use this command, an enabled trigger needs to be configured in UIP with:

  • Type set to "Advanced Webhook"
  • Authentication Type set to "HMAC SHA256 using key"
  • Authentication Key set to secret key provided by Microsoft when the Outgoing Webhook was created
  • Workflow set to the workflow containing the "ParseMessage" command
  • Parse Body unchecked
  • All Properties checked

In the workflow, the command's message property will be set to {wfsystem.body}.

Configuration





Commands

Send Message (sendmessage)

Sends a message to a Microsoft Teams channel.

Request Properties

Name Display Description Is Required Type
channelUrl Incoming Webhook URL The Incoming Webhook URL associated with the Microsoft Teams channel. True string
title Title The title of the card that will display the message. False string
message Message Message that will be displayed inside the card. True string
image Image Image that will be displayed inside the card. False string

Parse Message (parsemessage)

Parses the message received from an outgoing webhook associated with a Microsoft Teams channel.

Request Properties

Name Display Description Is Required Type
message Message The message received from an outgoing webhook associated with a Microsoft Teams channel. True string

Response Properties

Name Description Type
id ID of the message. string
datetime Date and time when the message was sent. string
sender Sender of the message. string
text Text from the message. string
summary Summary of the message. string
attachment.* Attachments from the message. string
channeldata.* Channel data extracted from the message. string

Release History

Version Type Description Tracking # Date
2.0.1 Initial First release in the Adapter Type store.
2.0.4 Maintenance Updated third-party components and improved maintainability. NAP-11518
2.0.5 Maintenance Updated third-party components and improved maintainability. NAP-23945 2022-11-29

Categories