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

# Microsoft Teams Integration for AI Agents & Workflows

> Create channels, send channel and chat messages, list teams/channels/chats/messages/shifts, search messages, and retrieve the current user via Microsoft Graph.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/microsoft-teams.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=c1b00e1df110c47d9f794aa9e01706a5" alt="Microsoft Teams logo" width="72" height="72" data-path="logos/microsoft-teams.svg" />

## Overview

Add **Microsoft Teams** to any ModuleX agent or workflow. Create channels, send channel and chat messages, list teams / channels / chats / messages / shifts, search messages, and retrieve the current user via the Microsoft Graph REST API (`graph.microsoft.com/v1.0`).

<Info>
  **Categories**: Communication · Productivity & Collaboration · **Auth**: OAuth2 · **Actions**: 12
</Info>

## Authentication

### OAuth2 Authentication

Connect with your Microsoft work or school account using OAuth 2.0. Personal accounts are not supported by Microsoft Teams APIs.

<Steps>
  <Step title="Step 1">
    Go to [https://entra.microsoft.com](https://entra.microsoft.com) (Microsoft Entra admin center) and open 'App registrations'
  </Step>

  <Step title="Step 2">
    Create a new registration (single-tenant or multi-tenant, as required by your deployment)
  </Step>

  <Step title="Step 3">
    Under Authentication, add the redirect URI: [https://api.modulex.dev/credentials/oauth2/callback](https://api.modulex.dev/credentials/oauth2/callback) (type: Web)
  </Step>

  <Step title="Step 4">
    Under API permissions, add Microsoft Graph delegated permissions: User.Read, Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, ChannelMessage.Send, Chat.ReadWrite, ChatMessage.Send, Schedule.Read.All, Mail.Read, and offline\_access
  </Step>

  <Step title="Step 5">
    Grant admin consent for the tenant if your organization requires it
  </Step>

  <Step title="Step 6">
    Under Certificates & secrets, create a Client Secret and copy its Value
  </Step>

  <Step title="Step 7">
    Copy the Application (client) ID and the Client Secret Value into ModuleX
  </Step>
</Steps>

#### Required Credentials

| Field         | Description                                                     | Required | Format                                 |
| ------------- | --------------------------------------------------------------- | -------- | -------------------------------------- |
| Client ID     | Microsoft Entra Application (client) ID for the registered app. | Yes      | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| Client Secret | Microsoft Entra Client Secret Value for the registered app.     | Yes      | `-`                                    |

#### OAuth Configuration

* **Authorization URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`
* **Token URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/token`
* **Scopes**: `offline_access`, `User.Read`, `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `ChannelMessage.Read.All`, `ChannelMessage.Send`, `Chat.ReadWrite`, `ChatMessage.Send`, `Schedule.Read.All`, `Mail.Read`

## Available Actions

<AccordionGroup>
  <Accordion title="create_channel — Create a new channel in Microsoft Teams.">
    ### Parameters

    <ResponseField name="team_id" type="string" required>
      ID of the Microsoft Team. Obtain it via `list_teams`.
    </ResponseField>

    <ResponseField name="display_name" type="string" required>
      Display name of the channel.
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the channel.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChannelResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph Channel resource.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "displayName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Displayname"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "membershipType": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Membershiptype"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChannelResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "channel": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChannelResource"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "CreateChannelOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_chat_message — Get a specific message from a chat.">
    ### Parameters

    <ResponseField name="chat_id" type="string" required>
      ID of the chat. Obtain it via `list_chats`.
    </ResponseField>

    <ResponseField name="message_id" type="string" required>
      ID of the message to retrieve. Obtain it via `list_messages_in_chat`.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatMessageResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph chatMessage resource (permissive — upstream returns many optional fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "from": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "body": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Body"
            },
            "importance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Importance"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChatMessageResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "message": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatMessageResource"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetChatMessageOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_current_user — Returns the authenticated Microsoft Teams user's ID, display name, email, and principal name via Microsoft Graph. Call this first when the user says 'my channels', 'my chats', or needs identity context.">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "CurrentUser": {
          "additionalProperties": false,
          "description": "Subset of Microsoft Graph user resource returned by get_current_user.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "displayName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Displayname"
            },
            "mail": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Mail"
            },
            "userPrincipalName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Userprincipalname"
            }
          },
          "title": "CurrentUser",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "user": {
          "anyOf": [
            {
              "$ref": "#/$defs/CurrentUser"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetCurrentUserOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_channel_messages — Lists messages in a Microsoft Teams channel.">
    ### Parameters

    <ResponseField name="team_id" type="string" required>
      ID of the Microsoft Team.
    </ResponseField>

    <ResponseField name="channel_id" type="string" required>
      ID of the channel within the team.
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      The maximum number of messages to return. Omit to fetch all available pages.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatMessageResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph chatMessage resource (permissive — upstream returns many optional fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "from": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "body": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Body"
            },
            "importance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Importance"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChatMessageResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "messages": {
          "items": {
            "$ref": "#/$defs/ChatMessageResource"
          },
          "title": "Messages",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListChannelMessagesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_channels — Lists all channels in a Microsoft Team.">
    ### Parameters

    <ResponseField name="team_id" type="string" required>
      ID of the Microsoft Team.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChannelResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph Channel resource.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "displayName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Displayname"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "membershipType": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Membershiptype"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChannelResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "channels": {
          "items": {
            "$ref": "#/$defs/ChannelResource"
          },
          "title": "Channels",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListChannelsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_chats — Lists all chat conversations for the authenticated user.">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph Chat resource (with members expanded).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "topic": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Topic"
            },
            "chatType": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Chattype"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastUpdatedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastupdateddatetime"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "members": {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "title": "Members",
              "type": "array"
            }
          },
          "title": "ChatResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "chats": {
          "items": {
            "$ref": "#/$defs/ChatResource"
          },
          "title": "Chats",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListChatsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_messages_in_chat — Get the list of messages in a chat, ordered by createdDateTime descending.">
    ### Parameters

    <ResponseField name="chat_id" type="string" required>
      ID of the chat.
    </ResponseField>

    <ResponseField name="max_results" type="integer">
      The maximum number of results to return. Omit to fetch all available pages.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatMessageResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph chatMessage resource (permissive — upstream returns many optional fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "from": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "body": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Body"
            },
            "importance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Importance"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChatMessageResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "messages": {
          "items": {
            "$ref": "#/$defs/ChatMessageResource"
          },
          "title": "Messages",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListMessagesInChatOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_shifts — Get the list of shift instances for a team.">
    ### Parameters

    <ResponseField name="team_id" type="string" required>
      ID of the Microsoft Team whose schedule is being queried.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ShiftResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph Shift resource.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "userId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Userid"
            },
            "schedulingGroupId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Schedulinggroupid"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastModifiedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastmodifieddatetime"
            },
            "sharedShift": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Sharedshift"
            },
            "draftShift": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Draftshift"
            }
          },
          "title": "ShiftResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "shifts": {
          "items": {
            "$ref": "#/$defs/ShiftResource"
          },
          "title": "Shifts",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListShiftsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_teams — Lists all teams the authenticated user has joined.">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "TeamResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph Team resource.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "displayName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Displayname"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "visibility": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Visibility"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "TeamResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "teams": {
          "items": {
            "$ref": "#/$defs/TeamResource"
          },
          "title": "Teams",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListTeamsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="search_messages — Search for email or chat messages via Microsoft Graph search. Valid entity_type values: `message` (email), `chatMessage` (Teams chat messages).">
    ### Parameters

    <ResponseField name="entity_type" type="string" required>
      The type of entity to search for. Valid values: `message` for email, `chatMessage` for Teams chat messages.
    </ResponseField>

    <ResponseField name="query_string" type="string" required>
      The query string to search for.
    </ResponseField>

    <ResponseField name="from_" type="integer">
      The index of the first result to return. (Default: `0`)
    </ResponseField>

    <ResponseField name="size" type="integer">
      The number of results to return (max 25). (Default: `25`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "SearchResponse": {
          "additionalProperties": false,
          "description": "Microsoft Graph search response wrapper.",
          "properties": {
            "value": {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "title": "Value",
              "type": "array"
            }
          },
          "title": "SearchResponse",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/SearchResponse"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchMessagesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="send_channel_message — Send a message to a team's channel. Optionally include inline images via `hosted_contents`.">
    ### Parameters

    <ResponseField name="team_id" type="string" required>
      ID of the Microsoft Team.
    </ResponseField>

    <ResponseField name="channel_id" type="string" required>
      ID of the channel within the team.
    </ResponseField>

    <ResponseField name="message" type="string" required>
      Message to be sent.
    </ResponseField>

    <ResponseField name="content_type" type="string">
      Whether the message body is plain text or HTML. Valid values: `text`, `html`. (Default: `text`)
    </ResponseField>

    <ResponseField name="hosted_contents" type="array">
      An array of JSON strings, each representing an inline hosted image. Each item must be a JSON object with `@microsoft.graph.temporaryId` (string), `contentBytes` (base64-encoded image data), and `contentType` (MIME type, e.g. `image/png`). Reference each image in HTML message bodies using `<img src="../hostedContents/1/$value">`.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatMessageResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph chatMessage resource (permissive — upstream returns many optional fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "from": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "body": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Body"
            },
            "importance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Importance"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChatMessageResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "message": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatMessageResource"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "SendChannelMessageOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="send_chat_message — Send a message to a team's chat.">
    ### Parameters

    <ResponseField name="chat_id" type="string" required>
      ID of the chat to post the message to.
    </ResponseField>

    <ResponseField name="message" type="string" required>
      Message to be sent.
    </ResponseField>

    <ResponseField name="content_type" type="string">
      Whether the message body is plain text or HTML. Valid values: `text`, `html`. (Default: `text`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "ChatMessageResource": {
          "additionalProperties": false,
          "description": "Microsoft Graph chatMessage resource (permissive — upstream returns many optional fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "from": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "From"
            },
            "body": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Body"
            },
            "importance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Importance"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            }
          },
          "title": "ChatMessageResource",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "message": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatMessageResource"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "SendChatMessageOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* Microsoft Graph applies per-app, per-tenant, and per-resource throttling. Teams messaging endpoints have specific RU-based limits documented at [https://learn.microsoft.com/en-us/graph/throttling](https://learn.microsoft.com/en-us/graph/throttling). Retry on HTTP 429 honoring the `Retry-After` header.
* `search_messages` returns at most 25 results per call (upper bound enforced by the Microsoft Graph search API for this entity-type set). Use the `from_` parameter to page beyond the first window.
* Dynamic team / channel / chat / message pickers are not available — pass IDs directly; use the corresponding `list_*` action to enumerate IDs.
* Webhook / change-notification subscriptions are not part of this integration; polling via the `list_*` actions is the supported pattern.
* Error model: non-2xx responses and timeouts are caught and returned as `success=False` plus an `error` string rather than raising. Plan for retries on the agent side based on the error text.

## Related integrations

<CardGroup cols={3}>
  <Card title="Google Meet" href="/integrations/tools/google-meet" />

  <Card title="Zoom" href="/integrations/tools/zoom" />

  <Card title="AgentMail" href="/integrations/tools/agentmail" />
</CardGroup>

## Links

* [Microsoft Teams](https://www.microsoft.com/microsoft-teams)
