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

# Microsoft Teams

> Connect Alysio to Microsoft Teams

## Overview

The Microsoft Teams integration connects Alysio to a user’s Microsoft account so Alysio can retrieve Teams collaboration data through the Microsoft Graph API.

Once connected, users can list the teams they belong to, browse channels within a team, retrieve recent channel messages, list their chats, and retrieve chat messages. This makes it easy to reference internal discussions, align on decisions, and pull context into revenue workflows directly from Alysio.

All access is authorized through OAuth 2.0 and is limited to the Microsoft Graph permissions granted during connection.

***

## Supported Data and Capabilities

### Teams

Access the teams the signed in user has joined.

Supported operations include:

Listing joined teams\
Retrieving team IDs for downstream channel queries

***

### Channels

Access channels within a team.

Supported operations include:

Listing channels for a team\
Retrieving channel IDs for message queries

***

### Channel Messages

Retrieve messages posted in a specific team channel.

Supported operations include:

Fetching recent messages\
Retrieving a defined number of messages\
Optionally expanding message fields when supported

***

### Chats

Access a user’s Teams chats.

Supported operations include:

Listing chats\
Retrieving chat IDs for message retrieval\
Optionally returning richer chat context such as members or message previews when supported

***

### Chat Messages

Retrieve messages in a specific chat thread.

Supported operations include:

Fetching recent chat messages\
Retrieving a defined number of messages\
Filtering or ordering messages when supported

***

## Authentication

### Method

**OAuth 2.0 through Microsoft identity platform Azure AD**

### API Provider

Microsoft Graph API

### Redirect URI

Configured in Alysio when setting up the Microsoft Teams integration.\
The Azure AD application must allow this redirect URI.

***

## Token Handling

OAuth tokens for the connected Microsoft account are stored securely and refreshed automatically.

Each user has their own credential connection so all Teams and chat access is scoped to that user’s Microsoft account.

If the integration is disconnected or authorization is revoked, Microsoft Teams tools will not be available until reconnection.

***

## Required Microsoft Graph Permissions

The Microsoft Teams integration typically uses delegated Microsoft Graph permissions aligned to the tool set below.

User Read\
Read signed in user profile and enable /me context

Team ReadBasic All\
List teams the user has joined

Channel ReadBasic All\
List channels within a team

ChannelMessage Read All or ChannelMessage Read Group\
Retrieve channel messages depending on the organization’s permission policy

Chat Read\
List chats and retrieve chat messages

***

## Permission Justification

| Permission                                           | Purpose                                                   |
| ---------------------------------------------------- | --------------------------------------------------------- |
| User.Read                                            | Required for /me context including joined teams and chats |
| Team.ReadBasic.All                                   | List teams the user is a member of                        |
| Channel.ReadBasic.All                                | List channels for a team                                  |
| ChannelMessage.Read.All or ChannelMessage.Read.Group | Retrieve channel messages                                 |
| Chat.Read                                            | List user chats and retrieve chat messages                |

Organizations may choose to scope channel message permissions more tightly depending on Teams governance policy.

***

## MCP Tools

The Microsoft Teams MCP exposes tools that allow Alysio to retrieve Teams and chat data via natural language prompts.

***

### microsoft\_teams\_get\_teams

Lists teams the current user has joined.

Example prompts

List my Teams teams\
What teams am I in

***

### microsoft\_teams\_get\_teams\_channels

Lists channels for a specific team.

Requires team\_id returned by microsoft\_teams\_get\_teams.

Example prompts

List channels for this team\
Show channels in the Engineering team

***

### microsoft\_teams\_get\_channel\_messages

Retrieves messages for a specific team channel.

Requires team\_id and channel\_id.\
Supports optional parameters like top and expand when available.

Example prompts

Show the last 10 messages in General\
Get recent messages from this channel

***

### microsoft\_teams\_get\_chats

Lists the current user’s chats.

Supports optional parameters such as expand, top, filter, and orderBy where the tool model allows.

Example prompts

List my Teams chats\
Show my most recent chats

***

### microsoft\_teams\_get\_chat\_messages

Retrieves messages for a specific chat thread.

Requires chat\_id returned by microsoft\_teams\_get\_chats.\
Supports optional parameters like top, filter, and orderBy.

Example prompts

Show messages in this chat\
Get the latest 20 messages from chat X

***

## App Behavior

Microsoft Teams data is retrieved on demand when users ask Alysio to list teams, browse channels, or read messages.

Alysio does not continuously sync Teams content. Each request triggers the relevant Microsoft Graph API call using the user’s OAuth credential.

This ensures Teams access remains permissioned, scoped, and tied to explicit user intent.

***

## Example Workflow

User asks

Show the last 10 messages from the General channel in my Engineering team

Alysio routes the request to the Microsoft Teams MCP.

The MCP retrieves the team ID using microsoft\_teams\_get\_teams.

The MCP retrieves the channel ID using microsoft\_teams\_get\_teams\_channels for that team.

The MCP retrieves the last 10 messages using microsoft\_teams\_get\_channel\_messages with top set to 10.

Microsoft Graph returns the channel messages.

Alysio displays the results in the conversation interface.

***

## Troubleshooting

### Microsoft Teams Not Connected

The user has not authorized the integration.

Solution\
Reconnect Microsoft Teams under Settings → Integrations and complete the OAuth flow.

***

### 401 Unauthorized

The token is invalid, expired, or revoked.

Solution\
Reauthorize the Microsoft Teams integration in Settings → Integrations.

***

### 403 Forbidden

The Azure AD app does not have sufficient Microsoft Graph permissions or the user has not consented.

Solution\
Confirm the Azure AD application includes the required delegated permissions and that tenant admin consent has been granted where required.

***

### Missing team\_id or channel\_id

Channel listing and channel message retrieval require the team ID and channel ID.

Solution\
Call microsoft\_teams\_get\_teams to retrieve team IDs, then microsoft\_teams\_get\_teams\_channels to retrieve channel IDs.

***

### Missing chat\_id

Chat message retrieval requires a chat ID.

Solution\
Call microsoft\_teams\_get\_chats to retrieve chat IDs, then call microsoft\_teams\_get\_chat\_messages using the desired chat\_id.

***

## Support

For help configuring or troubleshooting the Microsoft Teams integration, contact

[support@alysio.ai](mailto:support@alysio.ai)

Microsoft Graph reference topics that map to this integration include joinedTeams, channels, channel messages, chats, and chat messages.
