This guide explains how to use custom webhooks to send Cmd alerts to Microsoft Teams.
Prerequisites:
Before each integration can be added to a project, a global admin must enable it.
After that, a manager or admin can add the integration to a project.
Instructions
Get an incoming webhook URL for Teams by following Microsoft’s instructions here.
Go to the cmd web app.
- Click your project name in the top right, and choose Project and App Settings.
- In the left panel, go to Integrations preferences.
- Choose Webhook.
- Choose Add integration.Open the Cmd web app, and click your project title in the top right to open ‘Project and App Settings’, then ‘Integrations preferences’.
- Choose Webhook.
- Choose Add integration.
- Name your webhook (e.g. “MSTeams webhook”).
- Under ‘Webhook URL’, enter:
https://us-central1-cmd-production.cloudfunctions.net/msteams-forwarder
- Under ‘Custom JSON to send’, enter the following, replacing
WEBHOOK_URL_HERE with the Teams webhook URL which you copied:
{"Teams_webhook_url":"WEBHOOK_URL_HERE"}
For example:
4. Under ‘CQL properties to send’, select whichever CQL properties you want sent as part of the custom Slack alert.
As a starting point, you might use the properties in the screenshot above. (For more on CQL values, see Understanding CQL webhook properties.)
Click Save.
5. Your integration should be ready. To set up MSTeams alerts:
Create a new trigger which you can fire for testing.
Add the action ‘Send custom webhook alert’, making sure to select the correct webhook integration if you have more than one.
You should instantly receive an alert that looks like this:
Additional resources
Please send any remaining questions to Cmd support.