> For the complete documentation index, see [llms.txt](https://whitepaper.aitech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.aitech.io/agentforge/tools/microsoft_teams.md).

# microsoft\_teams

[Microsoft Teams](https://teams.microsoft.com/) is a robust communication and collaboration platform that enables users to engage in real-time messaging, meetings, and content sharing within teams and organizations. As part of Microsoft's productivity ecosystem, Microsoft Teams offers seamless chat functionality integrated with Office 365, allowing users to post messages, coordinate work, and stay connected across devices and workflows.

With Microsoft Teams, you can:

* **Send and receive messages**: Communicate instantly with individuals or groups in chat threads
* **Collaborate in real-time**: Share updates and information across teams within channels and chats
* **Organize conversations**: Maintain context with threaded discussions and persistent chat history
* **Share files and content**: Attach and view documents, images, and links directly in chat
* **Integrate with Microsoft 365**: Seamlessly connect with Outlook, SharePoint, OneDrive, and more
* **Access across devices**: Use Teams on desktop, web, and mobile with cloud-synced conversations
* **Secure communication**: Leverage enterprise-grade security and compliance features

In Agent Forge, the Microsoft Teams integration enables your agents to interact directly with chat messages programmatically. This allows for powerful automation scenarios such as sending updates, posting alerts, coordinating tasks, and responding to conversations in real time. Your agents can write new messages to chats or channels, update content based on workflow data, and engage with users where collaboration happens. By integrating Agent Forge with Microsoft Teams, you bridge the gap between intelligent workflows and team communication — empowering your agents to streamline collaboration, automate communication tasks, and keep your teams aligned.

### Usage Instructions

Integrate Microsoft Teams functionality to manage messages. Read content from existing messages and write to messages using OAuth authentication. Supports text content manipulation for message creation and editing.

### Tools

#### `microsoft_teams_read_chat`

Read content from a Microsoft Teams chat

**Input**

| Parameter     | Type   | Required | Description                                  |
| ------------- | ------ | -------- | -------------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Microsoft Teams API |
| `chatId`      | string | Yes      | The ID of the chat to read from              |

**Output**

| Parameter        | Type    | Description           |
| ---------------- | ------- | --------------------- |
| `content`        | string  | Message content       |
| `metadata`       | json    | Message metadata      |
| `updatedContent` | boolean | Content update status |

#### `microsoft_teams_write_chat`

Write or update content in a Microsoft Teams chat

**Input**

| Parameter     | Type   | Required | Description                                  |
| ------------- | ------ | -------- | -------------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Microsoft Teams API |
| `chatId`      | string | Yes      | The ID of the chat to write to               |
| `content`     | string | Yes      | The content to write to the message          |

**Output**

| Parameter        | Type    | Description           |
| ---------------- | ------- | --------------------- |
| `content`        | string  | Message content       |
| `metadata`       | json    | Message metadata      |
| `updatedContent` | boolean | Content update status |

#### `microsoft_teams_read_channel`

Read content from a Microsoft Teams channel

**Input**

| Parameter     | Type   | Required | Description                                  |
| ------------- | ------ | -------- | -------------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Microsoft Teams API |
| `teamId`      | string | Yes      | The ID of the team to read from              |
| `channelId`   | string | Yes      | The ID of the channel to read from           |

**Output**

| Parameter        | Type    | Description           |
| ---------------- | ------- | --------------------- |
| `content`        | string  | Message content       |
| `metadata`       | json    | Message metadata      |
| `updatedContent` | boolean | Content update status |

#### `microsoft_teams_write_channel`

Write or send a message to a Microsoft Teams channel

**Input**

| Parameter     | Type   | Required | Description                                  |
| ------------- | ------ | -------- | -------------------------------------------- |
| `accessToken` | string | Yes      | The access token for the Microsoft Teams API |
| `teamId`      | string | Yes      | The ID of the team to write to               |
| `channelId`   | string | Yes      | The ID of the channel to write to            |
| `content`     | string | Yes      | The content to write to the channel          |

**Output**

| Parameter        | Type    | Description           |
| ---------------- | ------- | --------------------- |
| `content`        | string  | Message content       |
| `metadata`       | json    | Message metadata      |
| `updatedContent` | boolean | Content update status |

### Notes

* Category: `tools`
* Type: `microsoft_teams`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://whitepaper.aitech.io/agentforge/tools/microsoft_teams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
