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

# Microsoft Teams Connector

<Badge icon="arrow-left" color="gray">[Back to Search AI connectors list](/ai-for-service/searchai/content-sources#supported-connectors)</Badge>

Microsoft Teams (MS Teams) is a collaboration and communication platform used in remote and hybrid work environments. Search AI ingests content from MS Teams channels, making conversations easily searchable.

## Connector Specifications

| Specification              | Details                                                 |
| -------------------------- | ------------------------------------------------------- |
| Repository type            | Cloud                                                   |
| Supported content          | Conversations from Public, Private, and Shared Channels |
| RACL support               | Yes                                                     |
| Content filtering          | No                                                      |
| Auto permission resolution | Yes                                                     |

## Prerequisites

* Azure account with Admin rights

## Register an Application

Search AI interacts with MS Teams through its APIs. You must register Search AI as an OAuth app in Microsoft Entra ID to enable this communication.

1. Sign in to the [Microsoft Entra Admin Center](https://entra.microsoft.com/).
2. Navigate to **App registrations** and click **New Registration**.
3. Enter a **Name** and choose an appropriate **Supported account type**.
4. Enter the **Redirect URI** that matches your region and deployment:
   * JP Region: `https://jp-bots-idp.kore.ai/workflows/callback`
   * DE Region: `https://de-bots-idp.kore.ai/workflows/callback`
   * Prod: `https://idp.kore.com/workflows/callback`
5. Click **Register** to create the app. A client ID is generated.
6. Go to **Certificates & secrets** and click **New Client Secret**.
7. Copy the client ID, client secret, and tenant ID for use in Search AI.

## Configure the MS Teams Connector in Search AI

Go to the **Connectors** home page in Search AI. Click **Add Connector** and select MS Teams. Provide the following details under the **Authorization** tab and click **Connect**.

| Field                  | Description                                          |
| ---------------------- | ---------------------------------------------------- |
| **Name**               | Unique name for the connector                        |
| **Authorization Type** | OAuth 2.0                                            |
| **Grant Type**         | Authorization Code                                   |
| **Client ID**          | Client credentials generated during app registration |
| **Client Secret**      | Client credentials generated during app registration |
| **Tenant ID**          | Tenant ID for your Microsoft account                 |

<Note>To access channel conversations, Search AI requires the following Microsoft Graph permissions: `Group.Read.All`, `Team.ReadBasic.All`, `ChannelMessage.Read.All`, `offline_access`, `Channel.ReadBasic.All`, `ChannelMember.Read.All`, `TeamMember.Read.All`, `User.Read.All`.</Note>

## Content Ingestion

After connecting the connector, go to the **Configuration** tab to set up content synchronization. Use **Sync Now** for an immediate sync, or **Schedule Sync** to configure a recurring schedule.

Search AI ingests conversations from MS Teams channels for the **past 90 days**.

Messages are ingested as follows:

* **Thread messages**: Messages in a thread are concatenated during ingestion to preserve conversation context and maintain dialogue flow.
* **Direct messages**: Two or more consecutive messages in a channel may be concatenated based on similarity score, retaining relevant context. A maximum of three consecutive messages can be concatenated.

Each ingested item's content field includes the message timestamp, author, channel name, and message text. If the message has an attachment, the attachment's name and URL are also captured.

Example content field:

```json theme={null}
"content": "In the searchai-dev channel, at 2024-12-26T13:20:07.170Z, john.smith messaged: The latest build is available for testing. Please find the release notes attached. This includes an attachment with the file name: release-notes.pdf and its URL: https://microsoft.com/files-pri/T082AFBJX27-F088SA71R4G/download/release-notes.pdf"
```

Reactions and mentions are captured as metadata. When two or more messages are concatenated, the URL links to the first message.

To view ingested content, go to the **Content** tab.

## RACL Support

Search AI automatically resolves permission entities for chat messages ingested from different channel types, using the team ID or channel ID based on the channel's access model.

| Channel Type         | `sys_racl` Value | Notes                                       |
| -------------------- | ---------------- | ------------------------------------------- |
| **Public Channels**  | Team ID          | All team members can access public channels |
| **Private Channels** | Channel ID       | Restricted to specific members              |
| **Shared Channels**  | Team ID          | Designed for cross-team collaboration       |
