Microsoft Teams connector and action

edit

Microsoft Teams connector and action

edit

The Microsoft Teams connector uses a webhook to send notifications.

Create connectors in Kibana

edit

You can create connectors in Stack Management > Connectors or as needed when you’re creating a rule. For example:

Teams connector
Connector configuration
edit

Microsoft Teams connectors have the following configuration properties:

Name
The name of the connector.
Webhook URL
The URL of the incoming webhook. Refer to Configure Microsoft Teams. If you are using the xpack.actions.allowedHosts setting, make sure the hostname is added to the allowed hosts.

Test connectors

edit

You can test connectors as you’re creating or editing the connector in Kibana. For example:

Teams params test

Microsoft Teams actions have the following properties.

Message
The message text. Markdown, images, and other advanced formatting are not yet supported.

Connector networking configuration

edit

Use the Action configuration settings to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use xpack.actions.customHostSettings to set per-host configurations.

Configure Microsoft Teams

edit

Microsoft 365 connectors are being retired; you must use the Workflows app to create a webhook URL. For example:

  1. Go to the Workflows app in Teams and select the Create tab.
  2. Create a workflow from a blank template.

    You cannot use the "Post to a channel when a webhook request is received" template; it does not work with the Microsoft Teams connector.

  3. Add a trigger as the first step in the workflow. Search for webhook triggers and select When a Teams webhook request is received. Set Who can trigger the flow? to Anyone.
  4. Add Post message in a chat or channel as the second step in the workflow.

    1. Set Post as to Flow bot.
    2. Set Post in to Channel.
    3. Set Team and Channel to the appropriate values for where you want the message displayed.

    4. Set the Message to @{triggerBody()?['text']}.

      Alternatively, you can add a Parse JSON step before the Post message in a chat or channel step in the workflow. Set the Content to Body and the Schema to the following value:

      {
          "type": "object",
          "properties": {
              "text": {
                  "type": "string"
              }
          }
      }
  5. Save the workflow and copy the HTTP POST URL from the first step. This is the URL required by the Microsoft Teams connector.