Skip to main content

Microsoft Teams

The Microsoft Teams integration enables you to manually send messages about Moogsoft Onprem alerts and Situations to one or more Teams channels.

The integration sends HTTP posts with a JSON payload including the message text to an incoming Teams webhook.

See the Microsoft Teams documentation for details on Teams components.

Before You Begin

The Teams integration has been validated with Microsoft Teams v1.2.00.3961. Before you set up your integration, ensure you have met the following requirements:

  • You have a Teams account and the ability to configure an incoming webhook.

  • You have created at least one team and channel for incoming messages from Moogsoft Onprem.

Important

Microsoft have issued a deprecation notice for the Office 365 Webhook Connector currently used by the MS Teams integration.

In the deprecation notice, they recommend moving to MS Teams Workflow Webhooks that are based on Power Automate workflows.

The existing integration forwards messages as plain text - which work with the Office 365 Webhook Connector. The Workflow Webhooks require messages are sent as Adaptive Cards so the Integration has now been updated with a new notification option: 'Send Adaptive Card'

If enabled, this will use a simple Adaptive Card that is compatible with both the old Office 365 Webhook Connector and the Workflow Webhook.

Configure the Teams Webhook

Integration Using 'MS Teams Workflow Webhooks':

  • To configure the Teams Workflow webhook:

    1. Launch Microsoft Teams.

    2. Either:

      1. In the Workflow App in Teams, create new workflow based on the template: "Post to a channel when a webhook request is received".

      2. Click "Next" and then select the Team and Channel to post to from the presented drop down list.

      3. Click "Create flow", copy the generated URL and then click "Done" to close.

    3. Or:

      1. In a channel that you wish to receive messages, right click and open the Workflow app.

      2. Select the template "Post to a channel when a webhook request is received" and follow the prompts to add the workflow.

      3. Copy the webhook URL.

    4. Repeat steps 2 or 3 for any other teams and channels to receive messages from Moogsoft Onprem.

  • To post to a private channel, an additional step is required: Open Power Automate and find the flow created above:

    1. Edit the flow

    2. Click on the last step "Post card in a chant or channel"

    3. Update the parameters for that step to set:

      • Post As: User

      • Post In: Channel

    4. This will post messages as the user that created the workflow. As long as the user is a member of the channel, they'll be able to post to it.

Legacy Integration:

  • To configure the Teams webhook:

    1. Launch Microsoft Teams.

    2. Add an Incoming Webhook to the team and channel to receive messages from Moogsoft Onprem.

    3. Copy the webhook URL.

    4. Repeat steps 2 and 3 for any other teams and channels to receive messages from Moogsoft Onprem.

See the Microsoft Teams documentation for more information on configuring incoming webhooks.

Configure the Teams Integration

Configure the Teams integration as follows:

  1. Navigate to the Integrations tab.

  2. Click Microsoft Teams in the Collaboration section.

  3. Provide the following:

    • A unique integration name. You can use the default name or customize the name according to your needs.

    • The webhook URLs from Teams. For the 'MS Teams Workflow Webhooks' integration, use the generated Workflow Webhook URLs as notification URLs.

    • The MoogDb Situation and alert database fields to be included in the message text into the Situation Message Rule and Alert Message Rule properties

You can optionally configure the number of seconds the integration waits for a connection to Teams before timing out. Defaults to 10.

The following configuration options are also available:

  • Notify Added Teams — Controls notifications as teams are added to a situation.

  • Auto Raise — When enabled, the integration automatically forwards all mapped situations.

  • Auto Raise Field — When enabled, the integration forwards situations containing a flag in the supplied field.

  • Enable the "Send Adaptive Card" option. If this options isn't enable the webhook will be rejected by Teams.

Note

Auto Raise and Auto Raise Field are separate and exclusive from one another. If Auto Raise is enabled, then all situations will be forwarded, regardless of the value of Auto Raise Field.

After you configure the integration, you can right-click a Situation or an alert and select Tools > Escalate to Microsoft Teams from the menu.

The integration prefixes Teams messages with the severity and the alert or Situation ID. The ID is linked to the alert or Situation in Moogsoft Onprem.

Upgrading the MS Teams Integration

If MS Teams is already configured, and 'MS Teams Workflow Webhooks' support is needed, an update is required to the moogdb database to add the "Send Adaptive Card" option.

For OnPremise installations : Run the following command:

$MOOGSOFT_HOME/bin/utils/moog_mysql_client -e "insert into integration_properties values ('ms_teams', 'sendAdaptiveCard', true, 1);"

For Hosted Customers : Please raise a support ticket to allow the Hosted Ops team to perform the required change.

Once added, the option can be enabled or disabled via the UI integration tile.