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.
- Open your project and go to Tools → Add tool → From template.
- Find Microsoft Teams and click Connect Microsoft Teams.
- Sign in with a Microsoft 365 work account that is a member of the teams the agent should post to.
- Review the permissions and click Accept.
- 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:
| Permission | Used for |
|---|---|
ChannelMessage.Send | Posting and replying in channels |
Channel.Create | Creating channels |
Chat.ReadWrite | Sending chat messages |
Team.ReadBasic.All | Listing teams and channels |
offline_access | Refreshing access without signing in again |
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}}
| Parameter | Required | Description |
|---|---|---|
team_id | Yes | Teams group/team ID |
channel_id | Yes | Channel ID within the team |
content | Yes | Message text |
content_type | No | text (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}}
| Parameter | Required | Description |
|---|---|---|
team_id | Yes | Team ID |
channel_id | Yes | Channel ID |
message_id | Yes | ID of the message to reply to |
content | Yes | Reply text |
content_type | No | text 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}}
| Parameter | Required | Description |
|---|---|---|
chat_id | Yes | Chat ID (retrieve from Microsoft Graph) |
content | Yes | Message content |
create_channel — Create Channel
Creates a new channel in a team.
Tool reference: {{tool:microsoft_teams_create_channel}}
| Parameter | Required | Description |
|---|---|---|
team_id | Yes | Team to create the channel in |
channel_name | Yes | Channel display name |
description | No | Channel description |
membership_type | No | standard (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}}
| Parameter | Required | Description |
|---|---|---|
team_id | Yes | Team 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}}
| Parameter | Required | Description |
|---|---|---|
team_id | Yes | Team ID |
channel_id | Yes | Channel ID |
message_id | Yes | Message to update |
content | Yes | New 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.