> 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-ai/use-harness-platform/notifications-alerts-and-banners/notifications/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 us get started.

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

Before you configure group notifications using Microsoft teams, ensure you have the following:

* [User Group Notification Preferences](/harness-ai/use-harness-platform/platform-access-control/add-user-groups.md#edit-notification-preferences): Configure notification channels for Harness to send messages to group members.
* Microsoft Teams administrator account

## Step 1: Create a webhook in Microsoft Teams <a href="#step-1-create-a-webhook-in-microsoft-teams" id="step-1-create-a-webhook-in-microsoft-teams"></a>

1. In Microsoft Teams, right-click the channel name where you want to send notifications, and select **Workflows** from the menu.

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

2. In the **Workflows** section, select the workflow **Post to a channel when webhook request is received**.

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

3. Provide a name for the webhook, then click **Next**.

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

4. Select the **Team** and **Channel** where you’d like to receive notifications, then click **Add Workflow**.

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

5. A webhook URL will be generated. Copy this URL for use in Harness.

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-38619d7fe51471a14b930f50d61f759001058e75%2Fsend-notifications-to-microsoft-teams-14.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>

In your **Account**/**Organization**/**Project** click Access Control.

Click **User Groups**.

Select the User Group to which you want to add notification preferences.

In **Notification Preferences**, select **Microsoft Teams Webhook URL**.

Paste the Webhook into **Microsoft Teams Webhook URL** or add it as an [Encrypted Text](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) in Harness and reference it here.

For example, if you have a text secret with the identifier `teamswebhookURL`, you can reference it like this: ​

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

You can reference a secret within the Org scope using an expression with `org`:​

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

You can reference a secret within the Account scope using an expression with `account`:​

```shell
<+secrets.getvalue("account.your-secret-Id")>​
```

Click **Save**.

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

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

## Next steps <a href="#next-steps" id="next-steps"></a>

* [Notifications](/harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/notifications-overview.md): Learn about other supported notification channels.
* [Configure notifications](/harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/configure-notifications.md): Set up pipeline-level notification rules.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-platform/notifications-alerts-and-banners/notifications/send-notifications-to-microsoft-teams" %}
