Microsoft Teams Integration Setup

Last updated on 15 August, 2022

You can set up a Microsoft Teams integration by configuring the Microsoft Teams Integration setting in your LogicMonitor portal. Configuring the settings creates one instance of a Microsoft Teams integration in your LogicMonitor portal, and each instance integrates with one Microsoft Teams channel. You can configure as many instances as your environment needs.

After an integration is set up, you can use the Microsoft Teams Integration settings to test the alert delivery between LogicMonitor and your Microsoft Teams channel.

You can also use the Microsoft Teams Integration settings to prevent Teams from managing alerts in a Channel. For example, you may configure the integration to enable more than one Team to manage alerts. If your environment changes and you need to prevent a Team from managing alerts, you can modify the integration settings to remove that Team. In addition, you can prevent all Teams in your environment from managing alerts using a single setting.

The Microsoft Teams integration leverages webhooks to route alerts. After you add webhook information in your LogicMonitor portal, you can do the following:

  • Establish communication—Establishing communication between LogicMonitor and a Microsoft Teams channel is accomplished using webhooks that you create in your Microsoft Teams channels. These webhooks contain information that you enter into the Microsoft Teams Integration settings in your LogicMonitor portal to establish the communication between LogicMonitor and Microsoft Teams.
  • Manage alerts—You can enable a Team to manage alerts between LogicMonitor and a Microsoft Teams channel. You can use the following commands to manage alerts directly in a Microsoft Teams channel.
To doUse this commandExample
Acknowledge@outogoing-webhook-name ack [alertId] [ackComment-optional]@webhookname LMA12345 OptionalComment
Set schedule downtime (SDT)@outogoing-webhook sdt [alertId] [sdtType] [sdtDuration] [sdtCcomment-optional]
@webhookname sdt LMA12345 device 30 minutes comment-Optional
Escalate@outogoing-webhook-name escalate [alertId]@webhookname escalate LMA12345

Note: You must be logged in to your LogicMonitor portal to acknowledge alerts from within Microsoft Teams.

Alternatively, you can also select the following buttons provided in MS Teams integration to manage alerts:

  • Acknowledge—Acknowledges the alert.
  • Schedule Down Time—Sets a scheduled downtime (SDT) for the alert.
  • Full Alert Details—Allows to view the complete alert details.
  • Update Linked User—Updates a user for MS Teams. This updated user can manage the alert from Teams.
  • Escalate—Escalate the alert to the next level. Before escalating an alert, make sure that the escalation chain with stages is already setup for your environment. For more information, see Escalation Chains.

In the following example, you can see the buttons to manage alerts from a MS Teams channel.

Requirements for Integrating with Microsoft Teams

To set up the Microsoft Teams Integration, you must create the following in Microsoft Teams:

  • An Incoming Webhook
    Creating an Incoming Webhook generates an Incoming Webhook URL used to establish communication between LogicMonitor and a Microsoft Teams channel. For more information, see Microsoft’s Create an Incoming Webhook documentation.
  • An Outgoing Webhook
    Creating an Outgoing Webhook generates an Outgoing Webhook Token (also called a Hash-based Authentication Code (HMAC) security token) used to manage LogicMonitor alerts for a single Microsoft Teams channel. For more information, see Microsoft’s Create Outgoing Webhook documentation.

Important: When creating the Outgoing Webhook in Microsoft Teams, you must use the following for the Callback URL:
https://integrationcenter.integrations.logicmonitor.com/rest/msTeams/outgoingWebhook

To enable or prevent a Team from managing alerts, you need a link to your Team. For more information, see Microsoft’s Create a link or a code for joining a team documentation. To prevent all Teams from managing alerts, you need the Tenant ID. You can obtain this from the Team link.

Setting up the Microsoft Teams Integration in LogicMonitor

  1. In LogicMonitor, navigate to Settings > Integrations.
  2. Select Add Integration.
  3. From the Add Integration pane, under Communication Integration, select Microsoft Teams.
  1. Enter a name and description for the Microsoft Teams integration.
  2. In the Incoming Webhook URL field, enter the Incoming Webhook URL you created in Microsoft Teams.

Warning: Ensure you select https:// from the drop-down menu and remove “https://” when entering the Webhook URL in the Incoming Webhook URL field.

  1. Select the Alert Statuses you want to send to your Microsoft Teams channel.

Note: The New Alerts status is enabled by default, but updates on the current alert status are optional (Acknowledged, Cleared, Escalated/De-escalated).

  1. To enable a Team to manage alerts from a Microsoft Teams channel, provide the following information for Add Outgoing Webhook Token:
    1. In the Outgoing Webhook URL field, enter the link to the Microsoft Team you want to manage alerts from.
    2. In the Outgoing Webhook Token field, enter the HMAC security token you generated when creating the Outgoing Webhook in Microsoft Teams.
    3. Select Save Token.

Note: Clicking Save Token stores the information, and then removes it from the settings. You can add as many Outgoing Webhook Tokens as your environment needs.

  1. If you want to prevent a Team from managing alerts, from Remove Outgoing Webhook Token, do the following:
    1. In the Outgoing Webhook Team URL field, enter the URL for the Outgoing Webhook .
    2. Select Delete Token.
  2. If you want to customize alert message, from Alert Data, select Insert Token, and select the tokens you want for customizing the alert message. For more information, see Tokens in the product documentation.

Note:

  • You can use only plain text format for the alert data message.
  • The order of the tokens that you add in the Alert Data section determines how the alert message is displayed in MS Team.
    1. If you want to test alert delivery, select Test Alert Delivery.
    2. Select Save.

    Testing the Microsoft Teams Alert Delivery

    1. In LogicMonitor, navigate to Settings > Integrations.
    2. Select Manage for the Microsoft Teams integration you want to test Alert Delivery for.
    3. Select Test Alert Delivery.

    A dialog displays indicating whether the alert was successfully posted to your Microsoft Teams channel.

    Preventing a Team from Managing Alerts

    1. In your LogicMonitor portal, navigate to Settings > Integrations.
    2. Select Manage for the Microsoft Teams integration you want to remove an Outgoing Webhook from.
    3. Do one of the following:
      • To prevent a single Team from managing alerts, click the disclosure triangle next to Remove Outgoing Webhook Token and do the following:
        • a. Enter the URL for the Outgoing Webhook in the Outgoing Webhook Team URL field.
        • b. Click Delete Token.

          Important: Ensure you select “https://” from the drop-down menu and remove “https://” when entering the Webhook URL in the Outgoing Webhook Team URL field.

      • To prevent all Teams from managing alerts, click the disclosure triangle next to Remove Outgoing Webhook Tokens and do the following:
        • a. Enter the tenant ID in the Tenant ID field.
        • b. Click Delete Token(s).

    4. Click Save.
    In This Article