All data sources

Microsoft Teams

OAuthteams

Microsoft Teams connector for teams, channels, members, chats, and messages. CRITICAL USAGE RULES: 1. Use list_teams() or get_team_by_name() to resolve team IDs before channel/member actions. 2. Provide teamId whenever possible to avoid name collisions. 3. For channel operations, supply channelId or channelName along with teamId. 4. send_chat_message() accepts chatId, email, or userId. For a named recipient, email/userId resolves or creates the chat and sends in one approved action. 5. get_chat_id_with() returns a chatId string (not an object) and creates a chat if it doesn't exist. PARAMETER ALIASES: - search_users(), search_messages(): "query" (also searchTerm/search/q) - get_chat_id_with() accepts both "email" and "userId"

Provenance

PublisherMicrosoft Teams

Freshness & coverage

FreshnessFreshness not declared
GeographicNot declared
TemporalNot declared
AuthenticationCredentials required (OAuth)

Methods (22)

  • list_chats

    read

    List Teams chats with optional retrieval of all available conversations.

    Input schema
    {
      "type": "object",
      "properties": {
        "fetchAll": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  • search_users

    read

    Search Teams users by query or search term.

    Input schema
    {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "searchTerm": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  • create_team

    write

    Create a Teams team with a name and description.

    Input schema
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "name"
      ]
    }
  • get_channel_by_name

    read

    Find a Teams channel by name within a specified team.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "channelName"
      ]
    }
  • get_messages_in_channel

    read

    List messages from a specified Teams channel using its team or channel identifier.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  • get_chat_messages

    read

    List messages from a specified Teams chat conversation.

    Input schema
    {
      "type": "object",
      "properties": {
        "chatId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "chatId"
      ]
    }
  • get_message_attachments

    read

    List attachments from a Teams message, chat, or channel context.

    Input schema
    {
      "type": "object",
      "properties": {
        "messageId": {
          "type": "string"
        },
        "chatId": {
          "type": "string"
        },
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "messageId"
      ]
    }
  • parse_message_attachments

    unknown

    Parse supported file attachments from a Teams message, chat, or channel context.

    Input schema
    {
      "type": "object",
      "properties": {
        "maxFileSizeMB": {
          "type": "number"
        },
        "fileTypes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "messageId": {
          "type": "string"
        },
        "chatId": {
          "type": "string"
        },
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "messageId"
      ]
    }
  • add_member_to_team

    write

    Add a member to a Teams team by email and role.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "role": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "owner"
              ]
            },
            {
              "type": "string",
              "enum": [
                "member"
              ]
            }
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "email"
      ]
    }
  • get_team_members

    read

    List members of a specified Teams team by team identifier.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  • remove_members_from_team

    write

    Remove specified members from a Teams team by email.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "emails": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "emails"
      ]
    }
  • add_channel_to_team

    write

    Create a channel in a Teams team with membership settings and description.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "membershipType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "standard"
              ]
            },
            {
              "type": "string",
              "enum": [
                "private"
              ]
            },
            {
              "type": "string",
              "enum": [
                "shared"
              ]
            }
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "channelName"
      ]
    }
  • remove_channel_from_team

    write

    Delete a channel from a specified Teams team.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  • add_member_to_channel

    write

    Add a member to a Teams channel by email and role.

    Input schema
    {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "role": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "owner"
              ]
            },
            {
              "type": "string",
              "enum": [
                "member"
              ]
            }
          ]
        },
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "email"
      ]
    }
  • get_channel_members

    read

    List members of a specified Teams channel by identifier.

    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string"
        },
        "teamName": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelName": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  • search_messages

    read

    Search message CONTENT across all Teams conversations by keyword, phrase, or sender mention when no specific conversation is named. Do NOT use when the user names a chat or channel — read it directly instead.

    Required paramsquery or search or q
    Input schema
    {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Text to find in messages. Supports KQL such as from:jeff.",
          "x-patchops-inference": "literal-search-term"
        },
        "search": {
          "type": "string",
          "description": "Alias for query."
        },
        "q": {
          "type": "string",
          "description": "Alias for query."
        },
        "size": {
          "type": "integer",
          "description": "Maximum hits, 1-50 (default 25)."
        },
        "from": {
          "type": "integer",
          "description": "Pagination offset (default 0)."
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "anyOf": [
            {
              "required": [
                "query"
              ]
            },
            {
              "required": [
                "search"
              ]
            },
            {
              "required": [
                "q"
              ]
            }
          ]
        }
      ]
    }
  • list_teams

    read

    List joined Microsoft Teams available to the current user.

    Input schema
    {
      "type": "object",
      "properties": {
        "fetchAll": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    }
  • get_team_by_name

    read

    Find a team by display name before channel or membership actions.

    Required paramsname
    Input schema
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Exact or partial team display name."
        }
      },
      "additionalProperties": true,
      "required": [
        "name"
      ]
    }
  • get_all_channels

    read

    List channels for a team.

    Required paramsteamId
    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string",
          "description": "Microsoft Teams team ID."
        },
        "teamName": {
          "type": "string"
        }
      },
      "additionalProperties": true,
      "required": [
        "teamId"
      ]
    }
  • send_message_in_channel

    write

    Post a plain-text message to a team channel identified by IDs or names.

    Required paramscontent
    Entitiesmessage, channel
    Input schema
    {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string",
          "description": "Microsoft Teams team ID."
        },
        "teamName": {
          "type": "string",
          "description": "Team display name when teamId is not known."
        },
        "channelId": {
          "type": "string",
          "description": "Channel ID."
        },
        "channelName": {
          "type": "string",
          "description": "Channel display name when channelId is not known."
        },
        "content": {
          "type": "string",
          "description": "Plain-text message body."
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "anyOf": [
            {
              "required": [
                "teamId"
              ]
            },
            {
              "required": [
                "teamName"
              ]
            }
          ]
        },
        {
          "anyOf": [
            {
              "required": [
                "channelId"
              ]
            },
            {
              "required": [
                "channelName"
              ]
            }
          ]
        }
      ],
      "required": [
        "content"
      ]
    }
  • get_chat_id_with

    write

    Resolve a one-to-one chat by recipient email or Microsoft user ID, creating the chat when none exists.

    Entitieschat
    Input schema
    {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Recipient email address."
        },
        "userId": {
          "type": "string",
          "description": "Microsoft Graph user ID or user principal name."
        }
      },
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "email"
          ]
        },
        {
          "required": [
            "userId"
          ]
        }
      ]
    }
  • send_chat_message

    write

    Send a plain-text Teams chat message. Provide a chatId or identify the recipient by email/userId; PatchOps resolves or creates the one-to-one chat before sending.

    Required paramscontent
    Entitiesmessage, chat
    Input schema
    {
      "type": "object",
      "properties": {
        "chatId": {
          "type": "string",
          "description": "Existing Teams chat ID."
        },
        "email": {
          "type": "string",
          "description": "Recipient email address when chatId is not known."
        },
        "userId": {
          "type": "string",
          "description": "Microsoft Graph user ID or user principal name when chatId is not known."
        },
        "content": {
          "type": "string",
          "minLength": 1,
          "description": "Plain-text message body."
        }
      },
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "chatId"
          ]
        },
        {
          "required": [
            "email"
          ]
        },
        {
          "required": [
            "userId"
          ]
        }
      ],
      "required": [
        "content"
      ]
    }