MicrosoftTeams

Description: Enable agents to interact with MicrosoftTeams

Author: Arcade

Code: GitHub

Auth: User authorization

PyPI VersionLicensePython VersionsWheel StatusDownloads

The Microsoft Teams toolkit provides a comprehensive set of tools for interacting with Microsoft Teams. Users can efficiently manage teams, channels, and chats, enabling them to:

  • Retrieve information about teams, channels, and chats.
  • List, search, and manage users and teams.
  • Send and reply to messages in both channels and chats.
  • Access and search for messages across chats and channels.
  • Create new chats and retrieve metadata about existing chats and channels.

This toolkit streamlines collaboration and communication within Microsoft Teams, making it easier to manage interactions and information flow.

Available Tools

Tool NameDescription
MicrosoftTeams.GetSignedInUserGet the user currently signed in Microsoft Teams.
MicrosoftTeams.ListUsersLists the users in the Microsoft Teams tenant.
MicrosoftTeams.SearchUsersSearches for users in the Microsoft Teams tenant.
MicrosoftTeams.GetChannelMetadataRetrieves metadata about a Microsoft Teams channel and its members.
MicrosoftTeams.ListChannelsLists channels in Microsoft Teams (including shared incoming channels).
MicrosoftTeams.SearchChannelsSearches for channels in a given Microsoft Teams team.
MicrosoftTeams.GetChannelMessagesRetrieves the messages in a Microsoft Teams channel.
MicrosoftTeams.GetChannelMessageRepliesRetrieves the replies to a Microsoft Teams channel message.
MicrosoftTeams.SendMessageToChannelSends a message to a Microsoft Teams channel.
MicrosoftTeams.ReplyToChannelMessageSends a reply to a Microsoft Teams channel message.
MicrosoftTeams.ListTeamsLists the teams the current user is associated with in Microsoft Teams.
MicrosoftTeams.SearchTeamsSearches for teams available to the current user in Microsoft Teams.
MicrosoftTeams.GetTeamRetrieves metadata about a team in Microsoft Teams.
MicrosoftTeams.ListTeamMembersLists the members of a team in Microsoft Teams.
MicrosoftTeams.SearchTeamMembersSearches for members of a team in Microsoft Teams.
MicrosoftTeams.GetChatMessageByIdRetrieves a Microsoft Teams chat message.
MicrosoftTeams.GetChatMessagesRetrieves messages from a Microsoft Teams chat (individual or group).
MicrosoftTeams.GetChatMetadataRetrieves metadata about a Microsoft Teams chat.
MicrosoftTeams.ListChatsList the Microsoft Teams chats to which the current user is a member of.
MicrosoftTeams.SendMessageToChatSends a message to a Microsoft Teams chat.
MicrosoftTeams.ReplyToChatMessageSends a reply to a Microsoft Teams chat message.
MicrosoftTeams.CreateChatCreates a Microsoft Teams chat.
MicrosoftTeams.SearchPeopleSearches for people the user has interacted with in Microsoft Teams and other 365 products.
MicrosoftTeams.SearchMessagesSearches for messages across Microsoft Teams chats and channels.

If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools.

MicrosoftTeams.GetSignedInUser


Get the user currently signed in Microsoft Teams.

Parameters

This tool does not take any parameters.

MicrosoftTeams.ListUsers


Lists the users in the Microsoft Teams tenant.

Parameters

  • limit (integer, optional) The maximum number of users to return. Defaults to 50, max is 100.
  • offset (integer, optional) The offset to start from.

MicrosoftTeams.SearchUsers


Searches for users in the Microsoft Teams tenant.

Parameters

  • keywords (array[string], required) The keywords to match against users’ names.
  • match_type (Enum PartialMatchType, optional) The type of match to use for the keywords. Defaults to match_any_of_the_keywords.
  • limit (integer, optional) The maximum number of users to return. Defaults to 50, max is 999.
  • offset (integer, optional) The offset to start from.

MicrosoftTeams.GetChannelMetadata


Retrieves metadata about a Microsoft Teams channel and its members.

Parameters

  • channel_id (string, optional) The ID of the channel to get. Provide either this or channel_name.
  • channel_name (string, optional) The name of the channel to get. Provide either this or channel_id.
  • team_id_or_name (string, optional) The ID or name of the team to get the channel of (optional). If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.ListChannels


Lists channels in Microsoft Teams (including shared incoming channels).

Parameters

  • limit (integer, optional) The maximum number of channels to return. Defaults to 50, max is 100.
  • offset (integer, optional) The offset to start from.
  • team_id_or_name (string, optional) The ID or name of the team to list the channels of (optional). If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.SearchChannels


Searches for channels in a given Microsoft Teams team.

Parameters

  • keywords (array[string], required) The keywords to search for in channel names.
  • match_type (Enum MatchType, optional) The type of match to use for the search. Defaults to ‘partial_match_all_keywords’.
  • limit (integer, optional) The maximum number of channels to return. Defaults to 50. Max of 100.
  • offset (integer, optional) The offset to start from.
  • team_id_or_name (string, optional) The ID or name of the team to search the channels of (optional). If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.GetChannelMessages


Retrieves the messages in a Microsoft Teams channel.

Parameters

  • channel_id (string, optional) The ID of the channel to get the messages of.
  • channel_name (string, optional) The name of the channel to get the messages of.
  • limit (integer, optional) The maximum number of messages to return. Defaults to 50, max is 50.
  • team_id_or_name (string, optional) The ID or name of the team to get the messages of. If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.GetChannelMessageReplies


Retrieves the replies to a Microsoft Teams channel message.

Parameters

  • message_id (string, required) The ID of the message to get the replies of.
  • channel_id_or_name (string, required) The ID or name of the channel to get the replies of.
  • team_id_or_name (string, optional) The ID or name of the team to get the replies of. If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.SendMessageToChannel


Sends a message to a Microsoft Teams channel.

Parameters

  • message (string, required) The message to send to the channel.
  • channel_id_or_name (string, required) The ID or name of the channel to send the message to.
  • team_id_or_name (string, optional) The ID or name of the team to send the message to. If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.ReplyToChannelMessage


Sends a reply to a Microsoft Teams channel message.

Parameters

  • reply_content (string, required) The content of the reply message.
  • message_id (string, required) The ID of the message to reply to.
  • channel_id_or_name (string, required) The ID or name of the channel to send the message to.
  • team_id_or_name (string, optional) The ID or name of the team to send the message to. If not provided: in case the user is a member of a single team, the tool will use it; otherwise an error will be returned with a list of all teams to pick from.

MicrosoftTeams.ListTeams


Lists the teams the current user is associated with in Microsoft Teams.

Parameters

  • membership_type (Enum TeamMembershipType, optional) The type of membership to filter by. Defaults to ‘direct_member_of_the_team’.

MicrosoftTeams.SearchTeams


Searches for teams available to the current user in Microsoft Teams.

Parameters

  • team_name_starts_with (string, required) The prefix to match the name of the teams.
  • limit (integer, optional) The maximum number of teams to return. Defaults to 10, max is 50.
  • next_page_token (string, optional) The token to use to get the next page of results.

MicrosoftTeams.GetTeam


Retrieves metadata about a team in Microsoft Teams.

Parameters

  • team_id (string, optional) The ID of the team to get.
  • team_name (string, optional) The name of the team to get. Prefer providing a team_id, when available, for optimal performance.

MicrosoftTeams.ListTeamMembers


Lists the members of a team in Microsoft Teams.

Parameters

  • team_id (string, optional) The ID of the team to list the members of.
  • team_name (string, optional) The name of the team to list the members of. Prefer providing a team_id, when available, for optimal performance.
  • limit (integer, optional) The maximum number of members to return. Defaults to 50, max is 999.
  • offset (integer, optional) The number of members to skip. Defaults to 0.

MicrosoftTeams.SearchTeamMembers


Searches for members of a team in Microsoft Teams.

Parameters

  • member_name_starts_with (string, required) The prefix to match the name of the members.
  • team_id (string, optional) The ID of the team to list the members of.
  • team_name (string, optional) The name of the team to list the members of. Prefer providing a team_id, when available, for optimal performance.
  • limit (integer, optional) The maximum number of members to return. Defaults to 50, max is 100.
  • offset (integer, optional) The number of members to skip. Defaults to 0.

MicrosoftTeams.GetChatMessageById


Retrieves a Microsoft Teams chat message.

Parameters

  • message_id (string, required) The ID of the message to get.
  • chat_id (string, required) The ID of the chat to get the message from.
  • user_ids (array[string], optional) The IDs of the users in the chat to get the message from.
  • user_names (array[string], optional) The names of the users in the chat to get the message from. Prefer providing user_ids, when available, since the performance is better.

MicrosoftTeams.GetChatMessages


Retrieves messages from a Microsoft Teams chat (individual or group).

Parameters

  • chat_id (string, optional) The ID of the chat to get messages from.
  • user_ids (array[string], optional) The IDs of the users in the chat to get messages from.
  • user_names (array[string], optional) The names of the users in the chat to get messages from. Prefer providing user_ids, when available, since the performance is better.
  • start_datetime (string, optional) The start date to filter messages. Provide a string in the format ‘YYYY-MM-DD’ or ‘YYYY-MM-DD HH:MM:SS’. Defaults to None (no start date filter).
  • end_datetime (string, optional) The end date to filter messages. Provide a string in the format ‘YYYY-MM-DD’ or ‘YYYY-MM-DD HH:MM:SS’. Defaults to None (no end date filter).
  • limit (integer, optional) The maximum number of messages to return. Defaults to 50, max is 50.

MicrosoftTeams.GetChatMetadata


Retrieves metadata about a Microsoft Teams chat.

Parameters

  • chat_id (string, optional) The ID of the chat to get metadata about.
  • user_ids (array[string], optional) The IDs of the users in the chat to get metadata about.
  • user_names (array[string], optional) The names of the users in the chat to get messages from. Prefer providing user_ids, when available, since the performance is better.

MicrosoftTeams.ListChats


List the Microsoft Teams chats to which the current user is a member of.

Parameters

  • limit (integer, optional) The maximum number of chats to return. Defaults to 50, max is 50.
  • next_page_token (string, optional) The token to use to get the next page of results.

MicrosoftTeams.SendMessageToChat


Sends a message to a Microsoft Teams chat.

Parameters

  • message (string, required) The message to send to the chat.
  • chat_id (string, optional) The ID of the chat to send the message.
  • user_ids (array[string], optional) The IDs of the users in the chat to send the message.
  • user_names (array[string], optional) The names of the users in the chat to send the message. Prefer providing user_ids, when available, since the performance is better.

MicrosoftTeams.ReplyToChatMessage


Sends a reply to a Microsoft Teams chat message.

Parameters

  • reply_content (string, required) The content of the reply message.
  • message_id (string, required) The ID of the message to reply to.
  • chat_id (string, optional) The ID of the chat to send the message.
  • user_ids (array[string], optional) The IDs of the users in the chat to send the message.
  • user_names (array[string], optional) The names of the users in the chat to send the message. Prefer providing user_ids, when available, since the performance is better.

MicrosoftTeams.CreateChat


Creates a Microsoft Teams chat.

Parameters

  • user_ids (array[string], optional) The IDs of the users to create a chat with.
  • user_names (array[string], optional) The names of the users to create a chat with.

MicrosoftTeams.SearchPeople


Searches for people the user has interacted with in Microsoft Teams and other 365 products.

Parameters

  • keywords (array[string], required) The keywords to match against people’s names. Provide one or more expressions.
  • match_type (Enum PartialMatchType, optional) The type of match to use for the keywords. Defaults to match_any_of_the_keywords.
  • limit (integer, optional) The maximum number of people to return. Defaults to 50, max is 100.
  • next_page_token (string, optional) The next page token to use for pagination.

MicrosoftTeams.SearchMessages


Searches for messages across Microsoft Teams chats and channels.

Parameters

  • keywords (string, required) The keywords to match against messages’ content.
  • limit (integer, optional) The maximum number of messages to return. Defaults to 50, max is 50.
  • offset (integer, optional) The offset to start from.

Auth

The Arcade MicrosoftTeams toolkit uses the Microsoft auth provider to connect to users’ MicrosoftTeams accounts. Please refer to the Microsoft auth provider documentation to learn how to configure auth.