> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Teams

> Send Validio notifications to a designated Microsoft Teams channel.

The Microsoft Teams integration sends Validio notification messages to a designated Microsoft Teams channel, letting your team receive alerts when data quality incidents are detected.

In Validio, you configure Microsoft Teams in two steps: create a Teams **integration** that holds the bot credentials, then create one or more **channels** that route alerts to specific Teams channels.

## Prerequisites for adding a Microsoft Teams integration

To send Validio notifications to designated channels in Microsoft Teams, you must first:

1. Create an app in Microsoft Teams for Validio.
2. Configure a bot in your Microsoft Teams app with the necessary permission scopes to communicate with your Validio installation.
3. Publish the app to the relevant channels where you want to route incident notifications from Validio.

You can find step-by-step instructions for creating and configuring the Microsoft Teams app in [Setting up a Microsoft Teams App for Validio](https://docs.validio.io/v10.0/docs/integrations/notification-channels/microsoft-teams/setting-up-a-microsoft-teams-app-for-validio.md).

After completing the Teams app setup you should have:

* A **Bot ID** (Client ID) for the Validio bot.
* A **Client secret** for the bot.
* (Single-tenant apps only) A **Tenant ID**.
* The **Teams channel ID** of each channel you plan to notify.

## Network requirements

If your Validio installation runs behind a firewall or HTTP proxy, allowlist the Microsoft endpoints below so Validio can send notifications to Microsoft Teams and, when enabled, power interactive messages. For HTTP proxy configuration, see [VPC Communication](https://docs.validio.io/v10.0/docs/deployment/virtual-private-cloud/vpc-communication-and-services.md).

Validio authenticates with Microsoft Entra ID and sends messages through the Microsoft Bot Framework over HTTPS. When interactive messages are enabled, Microsoft Teams also sends user actions to the bot endpoint on your Validio installation (`https://your-validio-instance/ms-teams-webhook`), so that endpoint must be reachable from Microsoft Teams.

| Endpoint | Protocol | Used for | Required |
| :- | :- | :- | :- |
| `smba.trafficmanager.net` | HTTPS | Sending and updating notification messages in Teams channels | Always |
| `login.microsoftonline.com` | HTTPS | Authenticating the Validio bot with Microsoft Entra ID | Always |
| `login.botframework.com` | HTTPS | Verifying that incoming interactive-message requests come from Microsoft Teams | Only with interactive messages |

These endpoints apply to the public Microsoft cloud only. Government and sovereign clouds, such as GCC High, DoD, and Microsoft Azure operated by 21Vianet, use different endpoints. For Microsoft's full list, see [Bot Framework URLs to allowlist](https://learn.microsoft.com/azure/bot-service/bot-service-resources-faq-security?view=azure-bot-service-4.0#which-specific-urls-do-i-need-to-allowlist-in-my-corporate-firewall-to-access-bot-framework-services).

## Create a Microsoft Teams integration

1. In Validio, navigate to **Workspace > Integrations** and click **+ New integration**.
2. From the **Integration type** list, select **Microsoft Teams**.
3. Enter a **Name** for the integration, for example "Validio Teams Bot".
4. Enter the **Client ID** and **Client secret** from your Teams app.
5. (Single-tenant apps only) Enter the **Tenant ID**.
6. (Optional) Enable **Interactive messages** so users can manage incidents directly from Teams.
7. (Optional) Click **Test integration** to verify the connection.
8. Click **Create integration**.

![The Microsoft Teams integration form, showing client ID, client secret, and tenant ID fields](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/900-msteams-integration.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=80cadfc9e591d2a28fb1c952e5ac2fe5)

Microsoft Teams integration configuration

## Create a notification channel for Microsoft Teams

1. In Validio, navigate to **Notifications > Channels** and click **+ New channel**.
2. Under **Integration**, select the Microsoft Teams integration you created.
3. Enter a **Name** for the channel.
4. Enter the **Teams channel ID** of the destination channel in your Microsoft Teams tenant.
5. Select the **Namespace** where the channel will be created. Only users assigned to the same namespace can access this channel.
6. Click **Create**.

### Microsoft Teams channel configuration parameters

| Field | Description |
| :- | :- |
| Integration | Select an existing Microsoft Teams integration. If none exists, create one first at **Workspace > Integrations**. |
| Name | Identifier for this Validio channel, used to label it in the channels list. |
| Teams channel ID | The ID of the Microsoft Teams channel where messages should be posted. To find this ID, go to the Teams channel and click "copy link". The relevant part of the link is after `channel/` and before the next `/`, for example: `...channel/CHANNEL-ID/`. Do not include the slashes around `CHANNEL-ID`. |
| Namespace | Namespace where the channel will be created. Only users assigned to the same namespace can access this channel. |

## Configure the notifications content

After adding the Microsoft Teams channel, add [notification rules](https://docs.validio.io/v10.0/docs/notifications/notification-rules.md) on the channel's details page to specify which incidents should be sent.

> [!NOTE]
>
> **Notifications on Backfilled Validators**
>
> Validio does not send notifications for incidents when backfilling validators.

## Microsoft Teams notification

When a notification rule on the Microsoft Teams channel triggers, a message is posted to the configured Teams channel. Incident notifications show the incident **priority** in the message body, so on-call engineers can route the alert without opening Validio.

## Troubleshooting

The following are troubleshooting tips for some common errors when configuring notifications to Microsoft Teams.

**Error: "The bot is not part of the conversation roster."**

* **Cause:** The app has not been added to the channel in Microsoft Teams.
* **Solution:** Add the app to the channel in Microsoft Teams before attempting to use it.

**Error: "Authorization has been denied for this request."**

* **Cause:** Tenant ID configuration mismatch.
* **Solution:**
  * If you entered a tenant ID, remove it. (The bot is likely configured as a multi-tenant bot.)
  * If you did not enter a tenant ID, add your tenant ID to the integration configuration.

**Error: "The client application `<client-id>` is missing service principal in the tenant."**

* **Cause:** The service principal has not been created for your bot in Azure AD.
* **Solution:** Create a service principal,
  1. Navigate to the [App registrations page](https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps) in the Azure portal.
  2. Locate your bot app.
  3. Click "Create Service Principal".
