Microsoft Teams

Use cases and templates: Microsoft Teams integration for AI agents

Use Microsoft Teams to read, send, update, or delete chat and channel messages, reply to threads, and add reactions. List teams, chats, channels, and their members to resolve destinations.

Switch to trigger mode to start a workflow from message notifications in a selected chat, or when the outgoing webhook is @mentioned in a channel. To mention a user, wrap the name in <at> tags, such as <at>userName</at>, and supply the mention details required by the action.

Chat subscriptions request creation and update notifications, but Sim deduplicates them by subscription and message ID within a seven-day window. Later edits may not start a separate workflow run.

OAuth scopes

Sim requests these scopes when someone connects a Microsoft Teams account. For a self-hosted deployment, register your own app with the provider using the settings below. See Integrations and OAuth for setup.

SettingValue
Redirect URI<NEXT_PUBLIC_APP_URL>/api/auth/oauth2/callback/microsoft-teams
Environment variablesMICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET
ScopeDescription
openidStandard authentication
profileAccess profile information
emailAccess email address
User.ReadSign in and read your profile
Chat.ReadRead your Teams chat messages
Chat.ReadWriteRead and write your Teams chat messages
Chat.ReadBasicRead names and members of your Teams chats
ChatMessage.SendSend chat messages
Channel.ReadBasic.AllRead channel names and descriptions
ChannelMessage.SendSend channel messages
ChannelMessage.Read.AllRead channel messages
ChannelMessage.ReadWriteRead and write channel messages
ChannelMember.Read.AllRead team channel members
Group.Read.AllRead all groups, memberships, and group content
Group.ReadWrite.AllRead and write all groups
Team.ReadBasic.AllRead team names and descriptions
TeamMember.Read.AllRead team members
offline_accessAccess account when not using the application
Files.ReadRead OneDrive files
Sites.Read.AllRead documents and list items in all SharePoint sites

Use the block

Read, write, update, and delete chat and channel messages. Reply to messages, add reactions, and list teams, chats, channels, and their members. Use trigger mode for message notifications in a selected chat, or an @mention of the outgoing webhook in a channel. Chat subscriptions request creation and update notifications, but Sim deduplicates them by subscription and message ID within a seven-day window. Later edits may not start a separate run. To mention users in messages, wrap their name in <at> tags: <at>userName</at>

Actions

Read Microsoft Teams Chat

Read content from a Microsoft Teams chat

Input

ParameterTypeRequiredDescription
chatIdstringYesThe ID of the chat to read from (e.g., "19:abc123def456@thread.v2" - from chat listings)
includeAttachmentsbooleanNoDownload and include message attachments (hosted contents) into storage

Output

ParameterTypeDescription
successbooleanTeams chat read operation success status
messageCountnumberNumber of messages retrieved from chat
chatIdstringID of the chat that was read from
messagesarrayArray of chat message objects
attachmentCountnumberTotal number of attachments found
attachmentTypesarrayTypes of attachments found
contentstringFormatted content of chat messages
attachmentsfile[]Uploaded attachments for convenience (flattened)

Write to Microsoft Teams Chat

Write or update content in a Microsoft Teams chat

Input

ParameterTypeRequiredDescription
chatIdstringYesThe ID of the chat to write to (e.g., "19:abc123def456@thread.v2" - from chat listings)
contentstringYesThe content to write to the message (plain text or HTML formatted, supports @mentions)
filesfile[]NoFiles to attach to the message

Output

ParameterTypeDescription
successbooleanTeams chat message send success status
messageIdstringUnique identifier for the sent message
chatIdstringID of the chat where message was sent
createdTimestringTimestamp when message was created
urlstringWeb URL to the message
updatedContentbooleanWhether content was successfully updated
filesfile[]Files attached to the message

Read Microsoft Teams Channel

Read content from a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team to read from (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings)
channelIdstringYesThe ID of the channel to read from (e.g., "19:abc123def456@thread.tacv2" - from channel listings)
includeAttachmentsbooleanNoDownload and include message attachments (hosted contents) into storage

Output

ParameterTypeDescription
successbooleanTeams channel read operation success status
messageCountnumberNumber of messages retrieved from channel
teamIdstringID of the team that was read from
channelIdstringID of the channel that was read from
messagesarrayArray of channel message objects
attachmentCountnumberTotal number of attachments found
attachmentTypesarrayTypes of attachments found
contentstringFormatted content of channel messages
attachmentsfile[]Uploaded attachments for convenience (flattened)

Write to Microsoft Teams Channel

Write or send a message to a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team to write to (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings)
channelIdstringYesThe ID of the channel to write to (e.g., "19:abc123def456@thread.tacv2" - from channel listings)
contentstringYesThe content to write to the channel (plain text or HTML formatted, supports @mentions)
filesfile[]NoFiles to attach to the message

Output

ParameterTypeDescription
successbooleanTeams channel message send success status
messageIdstringUnique identifier for the sent message
teamIdstringID of the team where message was sent
channelIdstringID of the channel where message was sent
createdTimestringTimestamp when message was created
urlstringWeb URL to the message
updatedContentbooleanWhether content was successfully updated
filesfile[]Files attached to the message

Update Microsoft Teams Chat Message

Update an existing message in a Microsoft Teams chat

Input

ParameterTypeRequiredDescription
chatIdstringYesThe ID of the chat containing the message (e.g., "19:abc123def456@thread.v2" - from chat listings)
messageIdstringYesThe ID of the message to update (e.g., "1234567890123" - a numeric string from message responses)
contentstringYesThe new content for the message (plain text or HTML formatted)

Output

ParameterTypeDescription
successbooleanWhether the update was successful
messageIdstringID of the updated message
updatedContentbooleanWhether content was successfully updated

Update Microsoft Teams Channel Message

Update an existing message in a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings or channel info)
channelIdstringYesThe ID of the channel containing the message (e.g., "19:abc123def456@thread.tacv2" - from channel listings)
messageIdstringYesThe ID of the message to update (e.g., "1234567890123" - a numeric string from message responses)
contentstringYesThe new content for the message (plain text or HTML formatted)

Output

ParameterTypeDescription
successbooleanWhether the update was successful
messageIdstringID of the updated message
updatedContentbooleanWhether content was successfully updated

Delete Microsoft Teams Chat Message

Soft delete a message in a Microsoft Teams chat

Input

ParameterTypeRequiredDescription
chatIdstringYesThe ID of the chat containing the message (e.g., "19:abc123def456@thread.v2" - from chat listings)
messageIdstringYesThe ID of the message to delete (e.g., "1234567890123" - a numeric string from message responses)

Output

ParameterTypeDescription
successbooleanWhether the deletion was successful
deletedbooleanConfirmation of deletion
messageIdstringID of the deleted message

Delete Microsoft Teams Channel Message

Soft delete a message in a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings or channel info)
channelIdstringYesThe ID of the channel containing the message (e.g., "19:abc123def456@thread.tacv2" - from channel listings)
messageIdstringYesThe ID of the message to delete (e.g., "1234567890123" - a numeric string from message responses)

Output

ParameterTypeDescription
successbooleanWhether the deletion was successful
deletedbooleanConfirmation of deletion
messageIdstringID of the deleted message

Reply to Microsoft Teams Channel Message

Reply to an existing message in a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings or channel info)
channelIdstringYesThe ID of the channel (e.g., "19:abc123def456@thread.tacv2" - from channel listings)
messageIdstringYesThe ID of the message to reply to (e.g., "1234567890123" - a numeric string from message responses)
contentstringYesThe reply content (plain text or HTML formatted message)

Output

ParameterTypeDescription
successbooleanWhether the reply was successful
messageIdstringID of the reply message
updatedContentbooleanWhether content was successfully sent

Get Microsoft Teams Message

Get a specific message from a Microsoft Teams chat or channel

Input

ParameterTypeRequiredDescription
teamIdstringNoThe ID of the team for channel messages (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID)
channelIdstringNoThe ID of the channel for channel messages (e.g., "19:abc123def456@thread.tacv2")
chatIdstringNoThe ID of the chat for chat messages (e.g., "19:abc123def456@thread.v2")
messageIdstringYesThe ID of the message to retrieve (e.g., "1234567890123" - a numeric string from message responses)

Output

ParameterTypeDescription
successbooleanWhether the retrieval was successful
contentstringThe message content
metadataobjectMessage metadata including sender, timestamp, etc.
↳ messageIdstringMessage ID
↳ contentstringMessage content
↳ createdTimestringMessage creation timestamp
↳ urlstringWeb URL to the message
↳ teamIdstringTeam ID
↳ channelIdstringChannel ID
↳ chatIdstringChat ID
↳ messagesarrayArray of message details
↳ messageCountnumberNumber of messages

Add Reaction to Microsoft Teams Message

Add an emoji reaction to a message in Microsoft Teams

Input

ParameterTypeRequiredDescription
teamIdstringNoThe ID of the team for channel messages (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID)
channelIdstringNoThe ID of the channel for channel messages (e.g., "19:abc123def456@thread.tacv2")
chatIdstringNoThe ID of the chat for chat messages (e.g., "19:abc123def456@thread.v2")
messageIdstringYesThe ID of the message to react to (e.g., "1234567890123" - a numeric string from message responses)
reactionTypestringYesThe emoji reaction (e.g., ❤️, 👍, 😊)

Output

ParameterTypeDescription
successbooleanWhether the reaction was added successfully
reactionTypestringThe emoji that was added
messageIdstringID of the message

Remove Reaction from Microsoft Teams Message

Remove an emoji reaction from a message in Microsoft Teams

Input

ParameterTypeRequiredDescription
teamIdstringNoThe ID of the team for channel messages (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID)
channelIdstringNoThe ID of the channel for channel messages (e.g., "19:abc123def456@thread.tacv2")
chatIdstringNoThe ID of the chat for chat messages (e.g., "19:abc123def456@thread.v2")
messageIdstringYesThe ID of the message (e.g., "1234567890123" - a numeric string from message responses)
reactionTypestringYesThe emoji reaction to remove (e.g., ❤️, 👍, 😊)

Output

ParameterTypeDescription
successbooleanWhether the reaction was removed successfully
reactionTypestringThe emoji that was removed
messageIdstringID of the message

List Microsoft Teams Team Members

List all members of a Microsoft Teams team

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings)

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
membersarrayArray of team members
memberCountnumberTotal number of members

List Microsoft Teams Channel Members

List all members of a Microsoft Teams channel

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings)
channelIdstringYesThe ID of the channel (e.g., "19:abc123def456@thread.tacv2" - from channel listings)

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
membersarrayArray of channel members
memberCountnumberTotal number of members

List Microsoft Teams Chat Members

List all members of a Microsoft Teams chat

Input

ParameterTypeRequiredDescription
chatIdstringYesThe ID of the chat (e.g., "19:abc123def456@thread.v2" - from chat listings)

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
membersarrayArray of chat members
memberCountnumberTotal number of members
hasMorebooleanWhether Graph indicated additional pages beyond this response

List Microsoft Teams

List the Microsoft Teams the current user is a direct member of

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
teamsarrayArray of teams the user is a member of
teamCountnumberTotal number of teams
hasMorebooleanWhether Graph indicated additional pages beyond this response

List Microsoft Teams Chats

List the Microsoft Teams chats the current user is part of

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
chatsarrayArray of chats the user is part of
chatCountnumberTotal number of chats
hasMorebooleanWhether Graph indicated additional pages beyond this response

List Microsoft Teams Channels

List all channels in a Microsoft Teams team

Input

ParameterTypeRequiredDescription
teamIdstringYesThe ID of the team (e.g., "12345678-abcd-1234-efgh-123456789012" - a GUID from team listings)

Output

ParameterTypeDescription
successbooleanWhether the listing was successful
channelsarrayArray of channels in the team
channelCountnumberTotal number of channels
hasMorebooleanWhether Graph indicated additional pages beyond this response

Triggers

A trigger starts a workflow when a supported event occurs in this service.

Microsoft Teams Channel

Trigger workflows when the outgoing webhook is @mentioned in a Microsoft Teams channel.

Configuration

ParameterTypeRequiredDescription
hmacSecretstringYesThe security token provided by Teams when creating an outgoing webhook. Used to verify request authenticity.

Output

ParameterTypeDescription
fromobject
↳ idstringSender ID
↳ namestringSender name
↳ aadObjectIdstringAAD Object ID
messageobject
↳ rawobject
↳ attachmentsjsonArray of attachments
↳ channelDataobject
↳ teamobject
↳ idstringTeam ID
↳ tenantobject
↳ idstringTenant ID
↳ channelobject
↳ idstringChannel ID
↳ teamsTeamIdstringTeams team ID
↳ teamsChannelIdstringTeams channel ID
↳ conversationobject
↳ idstringComposite conversation ID
↳ namestringConversation name (nullable)
↳ isGroupbooleanIs group conversation
↳ tenantIdstringTenant ID
↳ aadObjectIdstringAAD Object ID (nullable)
↳ conversationTypestringConversation type (channel)
↳ textstringMessage text content
↳ messageTypestringMessage type
↳ channelIdstringChannel ID (msteams)
↳ timestampstringTimestamp
activityobjectActivity payload
conversationobject
↳ idstringComposite conversation ID
↳ namestringConversation name (nullable)
↳ isGroupbooleanIs group conversation
↳ tenantIdstringTenant ID
↳ aadObjectIdstringAAD Object ID (nullable)
↳ conversationTypestringConversation type (channel)

Microsoft Teams Chat

Trigger workflows from Microsoft Teams chat message notifications via Microsoft Graph subscriptions. Notifications share a seven-day deduplication window keyed by subscription and message ID, so later edits may not start a separate run.

Configuration

ParameterTypeRequiredDescription
triggerCredentialsstringYesThis trigger requires microsoft teams credentials to access your account.
triggerChatIdstringYesThe ID of the Teams chat to monitor
includeAttachmentsbooleanNoFetch hosted contents and upload to storage

Output

ParameterTypeDescription
message_idstringMessage ID
chat_idstringChat ID
from_namestringSender display name
textstringMessage body (HTML or text)
created_atstringMessage timestamp
attachmentsfile[]Uploaded attachments as files