Skip to main content

Overview

This documentation outlines the step-by-step procedure to post automated messages to a Microsoft Teams channel using an Incoming Webhook. This functionality is particularly useful for integrating third-party applications or services to send real-time updates directly into MS Teams channels.

Pre-requisites

Users must have owner or member access to the Microsoft Teams channel.
Microsoft Teams app installed or access via Teams Web.
Permission to manage connectors in the selected channel.

Configure Incoming Webhook in MS Teams

1

Open Microsoft Teams

  1. Launch the Microsoft Teams app or navigate to teams.microsoft.com.
  2. Sign in using your organizational credentials.
2

Create a New Target Team & Channel

If you already have Target Teams & Channel to integrate, skip this step.
  1. In the Teams sidebar, select the Chat icon.
  2. Navigate to Teams and channels, click on the more options ellipsis (⋯).
  3. Select Your teams and channels, and click on Create team icon in the top right corner.
  4. In the Create a team pop-up, enter the mandatory values
    • Team name: (For example AirMDR Logs)
    • Name the first channel: (For example Workflow Test Channel)
  5. Click Create.
    Make sure to add the team members to the newly created Teams channel and click Add.
3

Navigate to the Target Team & Channel

  1. In the Teams sidebar, select the desired Team.
  2. Click on the specific Channel (For example Workflow Test Channel) where you want to post messages.
4

Open Channel Options

  1. Click on the more options ellipsis (⋯) next to the channel name (For example Workflow Test Channel).
  2. Select Workflows from the context menu you want to setup for your team. MS Teams1 Pn
    If you do not see “Workflows,” ensure the feature is enabled in your tenant or contact your IT administrator.
  3. In the pop-up search for and choose “Post to a channel when webhook request is received” option. MS Teams2 Pn
    For this workflow to run, all apps must have a valid connection.
  4. Select the radio button option beside Microsoft Teams option.
  5. Click Next.
5

Add Workflow

  1. In the Details, select your Microsoft Teams Team and Microsoft Teams Channel.
  2. Click Add workflow.
  3. In the same pop-up window, click on Manage your workflow option at the bottom left corner.
  4. Click Edit, to manage your workflow. MS Teams3 Pn
  5. Once the User is redirected to the edit page, double-click on the respective display boxes to expand and view the content. MS Teams8 Pn
    • Double-click and select “When a Teams webhook request is received” option to view “who can trigger the flow” and the “POST URL”.
      Copy the POST URL for future reference. That is, for the connector credential and webhook configuration in the AirMDR web interface.
    • Double-click and select “Send each adaptive card” option.
      • In the “Select an output from previous steps” search box, follow the below steps to ensure the output format is set to attachments
        • Delete the existing body.attachments
        • In the Dynamic content list, select the attachments. MS Teams10 Pn
      • For private Team channels, use the dropdowns to set Post as: Flow Bot.
      • Make sure Post in, Team and Channel fields are pointing to correct desired values.
      • Ensure the Adaptive card is defined as content. MS Teams9 Pn
  6. Click Save.

Send a Message using the Webhook

User can now send a message using a simple HTTP POST request using Postman or cURL. Example POST Request using cURL:

curl --location '<Workflow URL>' \
--header 'Content-Type: application/json' \
--data '{
    "attachments": [
      {
        "contentType": "application/vnd.microsoft.card.adaptive",
        "content": {
          "type": "AdaptiveCard",
          "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
          "version": "1.0",
          "body": [
            {
              "type": "TextBlock",
              "text": "✅ This is a new test message from curl!",
              "wrap": true
            }
          ]
        }
      }
    ]
  }'
The payload must be a valid JSON object with a text field. You can also include rich card formatting using MessageCard schema if needed.
Replace <Workflow_URL> with the URL copied from the Teams UI.
Response Sample 202 Accepted

Configure Microsoft Teams in AirMDR Integrations Dashboard

  1. Navigate to AirMDR, provide the credentials and click Login
  2. Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select Integrations.
  3. Use the search option, enter the keyword “Microsoft Teams”, select the Connections tab, and click + Create button. MS Teams6 Pn
  4. Enter an unique name to the Instance (e.g., your org name-MSTeams) to easily identify the user connection by AirMDR.
  5. Enter the generated Webhook URL in the Authentication Details field params, and click Create. MS Teams7 Pn

🔄 Managing or Deleting the Webhook

To manage the webhook:
  1. Go to the channel’s connectors (as in Step 3).
  2. Click Configured (top-left tab).
  3. Locate your webhook, and click Manage or Remove.

🛑 Security & Access Best Practices

  • Rotate webhook URLs periodically for security.
  • Do not expose webhook URLs in public repositories or logs.
  • Use appropriate naming conventions to identify webhook sources.