> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/notifications-and-banners/send-notifications-to-microsoft-teams.md).

# Send notifications to Microsoft Teams

This topic explains how to send user group notifications using Microsoft Teams.

Harness notifies your User Groups of events in Pipelines, and general alerts.

You can integrate your Harness User Group with Microsoft Teams and receive notifications in Teams channels.

Setup is a simple process of generating a Webhook in Microsoft Teams and adding it to a Harness User Group's Notification Preferences. Let's get started.

{% hint style="warning" %}
Microsoft retired the classic Office 365 Connector for Teams. Connectors created before the retirement stop working after the final rollout between May 18-22, 2026. Use the Workflows-based setup described below, which relies on Power Automate instead of the old connector.
{% endhint %}

## Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* See [User Group Notification Preferences](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/platform-access-control/add-user-groups.md#edit-notification-preferences)

## Review: Requirements <a href="#review-requirements" id="review-requirements"></a>

We assume you have a Microsoft Teams administrator account.

## Step 1: Create a webhook-triggered flow for your Microsoft Teams channel <a href="#step-1-create-a-webhook-triggered-flow-for-your-microsoft-teams-channel" id="step-1-create-a-webhook-triggered-flow-for-your-microsoft-teams-channel"></a>

Microsoft retired the classic Office 365 Connector for Teams, so the webhook that posts to your channel is now backed by a Power Automate flow.

1. In Microsoft Teams, click the **More options (…)** icon next to the channel name where you want to send notifications (or right-click the channel), and select **Workflows** from the menu.

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-2d93501dad68d8ae8e0d284f71a29eac72744691%2Fsend-notifications-to-microsoft-teams-22.png?alt=media)

2. Click **Build from scratch**. Under **Starts when**, the built-in trigger list doesn't include a Teams webhook trigger, so click **Build with Power Automate to see more triggers**. The Power Automate workflow configuration window opens.

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-75d8bdd46e242b9d6d92fb8b0c965c895e3d1311%2Fsend-notifications-to-microsoft-teams-32.png?alt=media)

3. Click **Add a trigger**, and under **Built-in tools**, select **Microsoft Teams Webhook**.

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-cbb7fbba88a3bab953ba48020a56f4371d3cbad8%2Fsend-notifications-to-microsoft-teams-33.png?alt=media)

4. The trigger **When a Teams webhook request is received** is added. Set **Who can trigger the flow?** to **Anyone**.

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-86e543e0302f79b09994f29a0002e7b92eebd237%2Fsend-notifications-to-microsoft-teams-25.png?alt=media)

5. Click the **+** icon below the trigger to add an action, search for **post**, and select **Post card in a chat or channel**.

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-e11cb2e3837bcb5cd3a40b63a5a3724d12b50d10%2Fsend-notifications-to-microsoft-teams-26.png?alt=media)

6. Configure **Post as**, **Post in**, the target **Team**, and the **Channel** where you want Harness notifications to appear. In the **Adaptive Card** field, select the **Expression (fx)** tab (do not enter the expression as plain text) to pass the trigger's body — the Adaptive Card payload Harness sends — into the action, and enter:

```
triggerBody()
```

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-0fefd04618c15290e76fc135d44f378850c0c4b6%2Fsend-notifications-to-microsoft-teams-27.png?alt=media)

7. Save the flow. On the workflow's **Overview** screen, click **Copy webhook link** to copy the webhook URL for use in Harness.

{% hint style="info" %}
The **How to run this workflow after setup** box on this screen notes: the message must include either an adaptive card or message card formatted payload, Workflows automatically runs the steps you set up after the card is sent, only POST requests are accepted, and the max payload is 256 KB.
{% endhint %}

![](https://204875495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHCl4N3pQkjhOYjQoOs7%2Fuploads%2Fgit-blob-c45500c4d01785e48c240ad301c1df34b99afbf3%2Fsend-notifications-to-microsoft-teams-37.png?alt=media)

## Step 2: Add webhook to Harness User Group Notification Preferences <a href="#step-2-add-webhook-to-harness-user-group-notification-preferences" id="step-2-add-webhook-to-harness-user-group-notification-preferences"></a>

1. In your **Account**/**Organization**/**Project**, click **Access Control**.
2. Click **User Groups**.
3. Select the User Group to which you want to add notification preferences.
4. In **Notification Preferences**, select **Microsoft Teams Webhook URL**.
5. Provide the webhook URL using one of the following options:
   * Paste the webhook URL directly into the **Microsoft Teams Webhook URL** field.
   * Store the URL as an [Encrypted Text](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/secrets/add-use-text-secrets.md) secret in Harness, and reference the secret in the **Microsoft Teams Webhook URL** field instead of pasting the raw URL. For example, if your secret's identifier is `teamswebhookURL`:

     ```
     <+secrets.getValue("teamswebhookURL")>​​
     ```

     To reference a secret scoped to the Org, use:

     ```
     <+secrets.getValue("org.your-secret-Id")>​
     ```

     To reference a secret scoped to the Account, use:

     ```
     <+secrets.getValue("account.your-secret-Id")>​
     ```
6. Click **Save**.

Now your Microsoft Teams channel will be used to notify this User Group of alerts.

## Step 3: Test the notification <a href="#step-3-test-the-notification" id="step-3-test-the-notification"></a>

Trigger a Harness pipeline that matches the notification rule you configured, then confirm the notification appears in the Teams channel with the pipeline details and the execution link.

{% @harness-feedback/feedback %}
