Skip to main content

Microsoft Teams Integration

The Microsoft Teams integration lets agents send messages, reply in threads, manage channels, and list teams — directly from a conversation. Use it for alert routing, escalation flows, or any workflow where the agent needs to reach a team via Teams.

Connect Microsoft Teams​

Microsoft Teams connects with OAuth. You sign in with your Microsoft work account; you do not need to register your own app or copy tokens.

  1. Open your project and go to Tools → Add tool → From template.
  2. Find Microsoft Teams and click Connect Microsoft Teams.
  3. Sign in with a Microsoft 365 work account that is a member of the teams the agent should post to.
  4. Review the permissions and click Accept.
  5. Back in the VoisX console, select the actions you want to enable and click Install integration.

The agent acts as the user who connected. VoisX requests these delegated Microsoft Graph permissions:

PermissionUsed for
ChannelMessage.SendPosting and replying in channels
Channel.CreateCreating channels
Chat.ReadWriteSending chat messages
Team.ReadBasic.AllListing teams and channels
offline_accessRefreshing access without signing in again
note

If your organization blocks user consent to third-party apps, Microsoft shows an "admin approval required" message. Ask your Microsoft 365 administrator to approve the VoisX app, then connect again.

Actions​

send_channel_message — Send Channel Message​

Posts a message to a Teams channel.

Tool reference: {{tool:microsoft_teams_send_channel_message}}

ParameterRequiredDescription
team_idYesTeams group/team ID
channel_idYesChannel ID within the team
contentYesMessage text
content_typeNotext (default) or html for rich formatting

Returns: message_id, created_at


reply_to_message — Reply to Message​

Replies to an existing message in a channel thread.

Tool reference: {{tool:microsoft_teams_reply_to_message}}

ParameterRequiredDescription
team_idYesTeam ID
channel_idYesChannel ID
message_idYesID of the message to reply to
contentYesReply text
content_typeNotext or html

send_chat_message — Send Chat Message​

Sends a message to a 1:1 or group chat.

Tool reference: {{tool:microsoft_teams_send_chat_message}}

ParameterRequiredDescription
chat_idYesChat ID (retrieve from Microsoft Graph)
contentYesMessage content

create_channel — Create Channel​

Creates a new channel in a team.

Tool reference: {{tool:microsoft_teams_create_channel}}

ParameterRequiredDescription
team_idYesTeam to create the channel in
channel_nameYesChannel display name
descriptionNoChannel description
membership_typeNostandard (default) or private

Returns: channel_id, channel_name


list_teams — List Teams​

Returns all teams the integration account has access to.

Tool reference: {{tool:microsoft_teams_list_teams}}

No parameters required.

Returns: Array of team_id, name, description


list_channels — List Channels​

Returns all channels in a team.

Tool reference: {{tool:microsoft_teams_list_channels}}

ParameterRequiredDescription
team_idYesTeam ID

Returns: Array of channel_id, name, membership_type


update_message — Update Message​

Edits a previously sent channel message.

Tool reference: {{tool:microsoft_teams_update_message}}

ParameterRequiredDescription
team_idYesTeam ID
channel_idYesChannel ID
message_idYesMessage to update
contentYesNew message content

Using Teams in an agent​

Escalation to Teams​

When a customer issue cannot be resolved automatically, or the user requests a human agent:
1. Collect a summary of the issue.
2. Use {{tool:microsoft_teams_send_channel_message}} to post to the support escalations channel:
- team_id: <your team ID>
- channel_id: <support channel ID>
- content: "🔔 Escalation needed\n**User:** [name]\n**Issue:** [summary]\n**Conversation started:** [time]"
3. Tell the user: "I've notified the support team and someone will follow up shortly."

Finding your team and channel IDs​

Use {{tool:microsoft_teams_list_teams}} to find your team IDs, then {{tool:microsoft_teams_list_channels}} with a team ID to find channel IDs. Copy these into your agent's system prompt as constants.

Troubleshooting​

401 Unauthorized​

The connection was revoked, or the user's password or sign-in policy changed. Reconnect Microsoft Teams.

403 Forbidden​

The connected user is not a member of that team or channel, or your administrator has not approved the requested permissions. Add the user to the team, or ask your administrator to approve the VoisX app.

404 Team or channel not found​

The team_id or channel_id is incorrect. Use list_teams and list_channels to find the correct IDs.

Was this page helpful?