Microsoft Teams
Microsoft™ Teams is an enterprise collaboration and communication platform. When you select Microsoft Teams as a service destination, any subscribed notification about an event can be sent as a message to a Microsoft Teams channel.
Create an incoming webhook URL
To post a Microsoft Teams notification, you need to create an incoming webhook URL. To create the incoming webhook URL, follow the steps in Add an incoming webhook.
Configuring a Microsoft Teams destination
You can configure a Microsoft Teams destination in the Destinations tab. As part of the configuration, enter the Microsoft Teams Incoming Webhook URL.
Create an Event Notifications topic
Click Topics in the Event Notifications instance and click Create. Enter the topic and filter details in the Topic details and Event filters steps, then click Create topic.
Configuring a Microsoft Teams subscription
Proceed to the Subscriptions step. Click Create, enter the subscription details in the Create subscription dialog, and click Create subscription to associate the Microsoft Teams destination to this topic.
How do Microsoft Teams notification from Event Notifications looks
Event Notifications generates Microsoft Teams notifications from the incoming payload. The template that Event Notifications uses to send to Microsoft Teams looks like the following example:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"items": [
{
"size": "large",
"text": "{{event.ibmendefaultshort}}",
"type": "TextBlock"
}
],
"type": "Container"
},
{
"text": "{{event.ibmendefaultlong}}",
"type": "TextBlock",
"weight": "Bolder",
"wrap": true
},
{
"actions": [
{
"targetElements": [
"stacktrace"
],
"title": "Show Data",
"type": "Action.ToggleVisibility"
}
],
"type": "ActionSet"
},
{
"id": "stacktrace",
"isVisible": false,
"items": [
{
"fontType": "monospace",
"isSubtle": true,
"size": "Small",
"text": "{{event.data}}",
"type": "TextBlock",
"weight": "Bolder",
"wrap": true
}
],
"type": "Container"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4"
}
}
]
}
Where:
ibmendefaultshortis the default short payload provided in the incoming payload.ibmendefaultlongis the default long payload provided in the incoming payload.datais the data JSON provided in the incoming payload and is formatted as JSON in the Microsoft Teams notification.
Testing a Microsoft™ Teams destination configuration
You can test a Microsoft™ Teams destination in the options menu next to the destination. You can test whether the provided configuration is correct with a single click.
For more information on testing a destination, see Testing Destinations.
Microsoft Teams retry policy
When publishing a Microsoft Teams notification, issues such as network errors and application glitches can cause the requests to fail. Event Notifications automatically retries failed requests to provide resiliency.
For detailed information about retry behavior, including retry attempts, delays, and timeout values, see Retry policy for destinations.