Configure an Endpoint for Microsoft Teams
Starting August 15th, 2024, new Microsoft Teams endpoints must be configured using the Workflows app. Read more on Microsoft's blog.
Integrate with Microsoft Teams using a Logz.io custom webhook to receive Logz.io notifications in your Microsoft Teams workspace.
Adding your Microsoft Teams endpoint
1. Allow firewall access
See Custom Endpoints for general instructions on setting up firewall access for Logz.io notifications.
This may include whitelisting Logz.io IPs and/or creating a verification token.
2. Add the endpoint
- To add a new custom endpoint, click Add endpoint.
- Type: Select the option Custom.
- URL: See MS docs for instructions on creating the webhook URL.
- Method: Select the POST method.
- Headers: Add
Content-Type=application/json
. - Payload: Add your payload message. See the next step for details.
3. Add your payload
Microsoft Teams requires that you send either the text
or summary
properties. Learn more from Microsoft.
Example payload
To use this example in your own endpoint, copy the payload. Note that double-brackets indicate parameters that will be auto-populated by Logz.io.
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "title: {{alert_severity}}: {{alert_title}}"
},
{
"type": "TextBlock",
"text": "summary: {{alert_description}}"
},
{
"type": "TextBlock",
"text": "text: {{alert_samples}}"
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View in OpenSearch Dashboards",
"url": "{{alert_app_url}}#/view-triggered-alert?from={{alert_timeframe_start_epoch_millis}}&to={{alert_timeframe_end_epoch_millis}}&definitionId={{alert_definition_id}}&switchToAccountId={{account_id}}"
}
]
}
}
]
}
4. Test the endpoint (Optional)
Click Run the test to test your endpoint. Logz.io shows if the message was successfully sent.
Check that the message arrived at the target endpoint.
5. Save the endpoint
Save your endpoint.