How can I configure the Microsoft Teams webhook to receive DSM system notifications?

How can I configure the Microsoft Teams webhook to receive DSM system notifications?

Purpose

This article provides a guide for configuring Microsoft Teams webhook in DSM Control Panel.

Important:

  1. This article has been updated in accordance with the Office 365 connectors retirement notice. We recommend following this article to update your connectors as soon as possible. All existing connectors within all clouds will continue to work until December 2024; however, using connectors beyond December 31, 2024, will require additional action.
  2. Starting August 15, 2024, all new creations should be created using the Workflows app in Microsoft Teams.

Environment

The application webhooks function is applicable to DSM 7.2 or above.

Resolution

  1. Go to Control Panel > Notification > Webhooks and click Add.
  2. In the pop-up window, select Microsoft Teams from the Provider drop-down list.
  3. Select a rule from the Rule drop-down list or click Create to create a new rule. This will be the rule used for sending notifications via this application webhook. Click Next.
  4. Specify the Provider name. This helps you distinguish this webhook from others.
  5. Modify the Subject. This will be appended to the beginning of the notification message.
  6. To obtain the Webhook URL, sign in to Microsoft Teams.1
    1. Click Apps on the left pane.
    2. Type Workflows in the search field, locate it in the search results on the right pane, and click Add > Add.
    3. Click Create and select Post to a channel when a webhook request is received.
    4. Enter a name in Flow name and click Next.
    5. Select the Microsoft Teams Team and Microsoft Teams Channel and click Create flow.
    6. Click Manage your workflow.
    7. Click Edit to modify the workflow you just created.
    8. Click the to the right of Send each adaptive card and select Delete. Click OK on the confirmation dialogue.
    9. Click + New step.
    10. Type Parse JSON in the search bar and click it in the search results.
    11. Click Add Dynamic Content and select Body.
    12. In the Schema field, enter the following command and click + New step.
      { "type": "object", "properties": { "text": { "type": "string" } } }
    13. In the search field, type in "post message in a chat or channel" and click on it in the search results.
    14. Select the Post as, Post in, Team, and Channel fields. Click Add dynamic content and select text. Then, click Save.
    15. Click on the When a Teams webhook request is received box and click the clipboard icon to copy the HTTP POST URL.
  7. Go back to DSM Control Panel and paste the URL in Webhook URL. Click Apply.
  8. After you have finished setting up, click on the webhook in the list to edit or remove it. You can also click Send Test Message to check that your settings are correct.