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

# Microsoft Teams

> Reference for the Tracecat Microsoft Teams integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Create Teams channel

Action ID: `tools.microsoft_teams.create_channel`

Create a new channel in a Microsoft Teams team. Can create either public (standard) or private channels.

Reference: [https://learn.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="display_name" type="string" required>
  The display name for the channel.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>

<ParamField path="description" type="string | null">
  Description for the channel.

  Default: `null`.
</ParamField>

<ParamField path="is_private" type="boolean">
  Whether to create a private channel (requires members).

  Default: `false`.
</ParamField>

<ParamField path="owner_user_ids" type="array[string] | null">
  List of user IDs to add as owners (required for private channels).

  Default: `null`.
</ParamField>

## Delete Teams channel

Action ID: `tools.microsoft_teams.delete_channel`

Delete a channel from a Microsoft Teams team.

Reference: [https://learn.microsoft.com/en-us/graph/api/channel-delete?view=graph-rest-beta\&tabs=http](https://learn.microsoft.com/en-us/graph/api/channel-delete?view=graph-rest-beta\&tabs=http)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="channel_id" type="string" required>
  The ID of the channel.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>

## List channel messages

Action ID: `tools.microsoft_teams.list_channel_messages`

Retrieve the list of messages (without the replies) in a channel of a team.

Reference: [https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta\&tabs=python](https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta\&tabs=python)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="channel_id" type="string" required>
  The ID of the channel.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>

<ParamField path="expand_replies" type="boolean">
  Whether to expand replies for each message.

  Default: `false`.
</ParamField>

<ParamField path="top" type="integer | null">
  Number of messages to return per page (default 20, max 50).

  Default: `null`.
</ParamField>

## Send adaptive card

Action ID: `tools.microsoft_teams.send_adaptive_card`

Send a message with Adaptive Cards to a Microsoft Teams channel.

Reference: [https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="card_elements" type="array[object]" required>
  List of Adaptive Card elements.
</ParamField>

<ParamField path="channel_id" type="string" required>
  The ID of the channel.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>

<ParamField path="title" type="string | null">
  Title for the card (appears as subject).

  Default: `null`.
</ParamField>

## Send replies to a Teams message

Action ID: `tools.microsoft_teams.post_replies`

Send a reply to a Microsoft Teams message.

Reference: [https://learn.microsoft.com/en-us/graph/api/chatmessage-post-replies?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/chatmessage-post-replies?view=graph-rest-1.0)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="channel_id" type="string" required>
  The ID of the channel.
</ParamField>

<ParamField path="message" type="string" required>
  The reply message to send.
</ParamField>

<ParamField path="message_id" type="string" required>
  The ID of the message to reply to.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>

<ParamField path="contentType" type="string">
  The content type of the reply message.

  Default: `"html"`.
</ParamField>

## Send Teams message

Action ID: `tools.microsoft_teams.send_message`

Send a message to a Microsoft Teams channel.

Reference: [https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0)

### Secrets

Required secrets:

* `microsoft_teams_oauth`: OAuth token `MICROSOFT_TEAMS_USER_TOKEN`.

### Input fields

<ParamField path="channel_id" type="string" required>
  The ID of the channel.
</ParamField>

<ParamField path="message" type="string" required>
  The message to send.
</ParamField>

<ParamField path="team_id" type="string" required>
  The ID of the team.
</ParamField>

<ParamField path="base_url" type="string">
  Base URL for the Microsoft Graph API.

  Default: `"https://graph.microsoft.com"`.

  Allowed values: `https://graph.microsoft.com`, `https://graph.microsoft.us`.
</ParamField>
