---
title: Microsoft Teams API Integration on Truto
slug: msteams
category: IM
canonical: "https://truto.one/integrations/detail/msteams/"
---

# Microsoft Teams API Integration on Truto



**Category:** IM  
**Status:** Generally available

## Unified APIs

### Unified Instant Messaging API

- **Channels** — Channels are a way to group the communication happening between users in the source application. Channels can be used for group messaging, team messaging, etc.
- **Members** — Members are users, apps, bots and integrations part of the organization. To differentiate between the type of member, use the `type` attribute.
- **Messages** — Messages are the communication between users in the source application.
- **Workspaces** — Workspaces represent concepts like teams, workspaces, projects in apps that support them

### Unified User Directory API

- **Me** — 
- **Users** — The User object represents a User.
- **Workspaces** — Workspaces represent concepts like teams, workspaces, projects in apps that support them

### Unified Search API

- **Search** — Search endpoint for all the apps.

## MCP-ready AI tools

Truto exposes 28 tools for Microsoft Teams that AI agents can call directly.

- **list_all_msteams_teams** — List all teams in Microsoft Teams. Returns id, displayName, and description for each team.
- **get_single_msteams_team_by_id** — Get information about a specific team in Microsoft Teams by id. Returns the team's properties and relationships.
- **list_all_msteams_team_members** — List members of a team in Microsoft Teams by team id. Returns member id, roles, displayName, userId, and email fields in the response.
- **get_single_msteams_team_member_by_id** — Get member of team by team_id and id in Microsoft Teams. Returns fields id, roles (member roles), displayName, userId, and email.
- **delete_a_msteams_team_member_by_id** — Remove a member from a team in Microsoft Teams using team_id and id. Returns 204 No Content on success.
- **list_all_msteams_search** — Run a search query with specified requests in Microsoft Teams. Requires requests array with entityTypes, region, query with queryString, from, and size. Returns searchTerms, hitsContainers with hits including hitId, rank, summary, and resource details.
- **list_all_msteams_users** — Get a list of user objects in Microsoft Teams. Returns default properties including businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, and userPrincipalName.
- **list_all_msteams_me** — Get information about the signed-in user in Microsoft Teams. Returns default user properties including businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, and userPrincipalName.
- **list_all_msteams_channels** — Get list of all channels in a team in Microsoft Teams. Requires team id. Returns channel id, createdDateTime, displayName, description, membershipType, tenantId, and isArchived status.
- **get_single_msteams_channel_by_id** — Get properties and relationships of a specific channel in Microsoft Teams by team_id and id. Returns id, createdDateTime, displayName, description, membershipType, and isArchived fields.
- **create_a_msteams_channel** — Create a new channel in a team in Microsoft Teams using team_id. Returns channel id, displayName, description, membershipType, and webUrl. Supports standard, private (max 200 members), and shared channels with limitations on owners for shared channels.
- **update_a_msteams_channel_by_id** — Update the properties of the specified channel in Microsoft Teams using team_id and id. Note: membershipType cannot be updated. Returns 204 No Content on success.
- **delete_a_msteams_channel_by_id** — Delete a channel by team_id and id in Microsoft Teams. Returns 204 No Content on success. Note: There is a known issue with application permissions for this API.
- **list_all_msteams_chats** — Get list of chats for user with user_id in Microsoft Teams. Returns chat id, topic, createdDateTime, lastUpdatedDateTime, chatType, chatViewpoint (isHidden, lastMessageReadDateTime), webUrl, and isHiddenForAllMembers.
- **get_single_msteams_chat_by_id** — Get a specific chat in Microsoft Teams by id. Returns fields such as id, topic, createdDateTime, lastUpdatedDateTime, chatType, webUrl, tenantId, onlineMeetingInfo, viewpoint, isHiddenForAllMembers, and may include members or lastMessagePreview if expanded.
- **create_a_msteams_chat** — Create a new chat in Microsoft Teams with required chatType and members. Returns chat id, topic, createdDateTime, lastUpdatedDateTime, and chatType. Only one one-on-one chat allowed between two members.
- **update_a_msteams_chat_by_id** — Update a chat's topic by id in Microsoft Teams. Requires the chat to be of type 'group'. Returns id, topic, createdDateTime, lastUpdatedDateTime, and chatType fields in the response.
- **delete_a_msteams_chat_by_id** — Delete a chat by id in Microsoft Teams. Only tenant admins and Teams service admins can perform this operation. Supports deletion of 1:1, meeting, and group chats but not channel chats. Returns 204 No Content on success.
- **list_all_msteams_chat_messages** — Get list of messages in a chat in Microsoft Teams by chat id. Returns message id, messageType, createdDateTime, lastModifiedDateTime, from user info, body content, and other message details.
- **get_single_msteams_chat_message_by_id** — Get a specific chat message in Microsoft Teams using chat_id and id. Returns fields such as id, createdDateTime, from, body, attachments, mentions, and reactions in the response.
- **create_a_msteams_chat_message** — Send a new chat message in the specified chat in Microsoft Teams. Requires chat id and message body content. Returns the created message with fields id, createdDateTime, from user info, and message body content.
- **update_a_msteams_chat_message_by_id** — Update a chatMessage by id in Microsoft Teams channel with properties like messageType, body, attachments, mentions, reactions, and messageHistory. Only policyViolation can be updated with application permissions. Returns 204 No Content for delegated and 200 OK for application permissions.
- **delete_a_msteams_chat_message_by_id** — Soft-delete a specific chat message in a channel in Microsoft Teams. Requires team_id, channel_id, and id. Returns a 204 No Content response if successful.
- **list_all_msteams_channel_messages** — Get list of channel messages for team_id and channel_id in Microsoft Teams. Returns messages sorted by last modified date including id, createdDateTime, lastModifiedDateTime, from user info, body content, webUrl, and channelIdentity.
- **get_single_msteams_channel_message_by_id** — Get a specific channel-message in Microsoft Teams using team_id, channel_id, and id. Returns fields such as id, createdDateTime, body, from, attachments, mentions, reactions, and channelIdentity.
- **create_a_msteams_channel_message** — Send a new chatMessage in a channel in Microsoft Teams. Requires team_id and channel_id. Returns fields including id, createdDateTime, body content, from user info, and webUrl.
- **update_a_msteams_channel_message_by_id** — Update a Microsoft Teams channel message by id in team_id and channel_id. Supports updating all chatMessage properties except policyViolation with delegated permissions, or only policyViolation with application permissions. Returns 204 No Content for delegated, 200 OK for application permissions.
- **delete_a_msteams_channel_message_by_id** — Soft-delete a specific channel message in Microsoft Teams. Requires team_id, channel_id, and id. Returns 204 No Content if successful.

## How it works

1. **Link your customer's Microsoft Teams account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Microsoft Teams.** The Proxy API is a 1-to-1 mapping of the Microsoft Teams API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Push real-time alerts into Teams channels where your users already work** — SaaS platforms can deliver automated notifications — incident alerts, deal updates, task assignments — directly into Microsoft Teams channels or 1:1 chats, eliminating context-switching and ensuring critical information reaches the right people instantly.
- **Auto-provision dedicated collaboration spaces for SaaS workflows** — When a new project, deal, or incident is created in your product, automatically spin up a Teams channel and populate it with relevant context and tagged team members, giving your users a ready-made collaboration hub without leaving their workflow.
- **Sync bi-directional messages between your product and Teams threads** — B2B SaaS companies building helpdesk, ITSM, or project management tools can sync Teams message threads with their internal ticket or task records, so conversations flow seamlessly between the SaaS dashboard and Microsoft Teams.
- **Map SaaS users to Teams identities for precise routing and mentions** — Using the User Directory API, SaaS products can resolve their users' Microsoft Teams identities by email or UPN, ensuring DMs, mentions, and notifications land with the correct person rather than requiring manual ID mapping.
- **Let customers choose exactly where notifications go with workspace discovery** — SaaS companies can list a customer's Teams and Channels in their own settings UI, letting end users pick which channel receives which alert type — turning a generic integration into a deeply personalized one.

## What you can build

- **Channel-based incident alerting with live status updates** — Post incident notifications to a Teams channel via create_a_msteams_channel_message, then use update_a_msteams_channel_message_by_id to edit the original message in-place as the incident progresses — no channel spam.
- **Automated deal room provisioning for CRM workflows** — When a deal hits a specific stage, create a private Teams channel with create_a_msteams_channel, resolve team members with list_all_msteams_users, and post deal context so sales, legal, and engineering can collaborate immediately.
- **1:1 DM-based feedback collection and task nudges** — Initiate private chats with specific users via create_a_msteams_chat and send targeted messages using create_a_msteams_chat_message — perfect for interview feedback requests, approval prompts, or personalized task reminders.
- **Two-way message sync between Teams threads and SaaS records** — Poll channel or chat messages with list_all_msteams_channel_messages or list_all_msteams_chat_messages and sync replies back to tickets, tasks, or CRM notes in your product for a true bi-directional ChatOps experience.
- **Team and channel picker in your product's settings UI** — Use list_all_msteams_teams and list_all_msteams_channels to render a native dropdown in your SaaS settings page, letting customers map their notification preferences to specific Teams workspaces and channels.
- **Cross-tenant search for historical message context** — Leverage list_all_msteams_search to query past chat and channel history for keywords like error codes or customer names, pulling relevant context into your product's incident reports or customer timelines.

## FAQs

### What authentication method does the Microsoft Teams integration use?

Microsoft Teams uses OAuth 2.0 via Microsoft Entra ID (formerly Azure AD). Truto handles the full OAuth flow — token acquisition, refresh, and tenant consent — so your end users connect their Teams account through a managed auth experience without you building any of it.

### Which Truto Unified APIs does the Microsoft Teams integration support?

Microsoft Teams maps to three Unified APIs: the Unified Instant Messaging API (covering Channels, Members, Messages, and Workspaces), the Unified User Directory API (covering Me, Users, and Workspaces), and the Unified Search API (covering Search). This means you can write to the unified schema and swap or add other IM providers later without rewriting your integration logic.

### Can I both read and write messages in Teams channels and chats?

Yes. The integration supports full CRUD on both channel messages (create, read, update, delete) and chat messages (create, read, update, delete). This enables patterns like posting an alert and then editing it in-place when its status changes, or syncing replies back to your product.

### How does Truto handle pagination for large Teams tenants with many users or channels?

Truto abstracts Microsoft Graph's pagination logic behind its unified list endpoints. When you call list_all_msteams_users or list_all_msteams_channels, Truto handles cursor-based pagination automatically, returning consistent results regardless of the tenant size.

### Can I create and manage Teams channels programmatically?

Yes. The integration supports create_a_msteams_channel, update_a_msteams_channel_by_id, and delete_a_msteams_channel_by_id, enabling automated workspace provisioning workflows like spinning up project rooms or deal channels on the fly.

### How do I map a user in my SaaS product to their Microsoft Teams identity?

Use list_all_msteams_users to retrieve the tenant's user directory, which includes email addresses and UPNs. You can match these against your product's user records to resolve the correct Teams user ID for sending DMs, mentions, or permission checks. The list_all_msteams_me endpoint returns the authenticated user's own profile for quick identity resolution.
