TEAMS_LIST pagination: follow @odata.nextLink in large tenants
Private/shared channels may be omitted unless permissions align
GET_CHANNEL returns 404 if team_id or channel_id is wrong
Always source IDs from list operations; do not guess ID formats
5. Search Messages
When to use
User wants to find messages across Teams chats and channels
Tool sequence
:
MICROSOFT_TEAMS_SEARCH_MESSAGES
- Search with KQL syntax [Required]
Key parameters
:
query
KQL search query (supports from:, sent:, attachments, boolean logic)
Pitfalls
:
Newly posted messages may take 30-60 seconds to appear in search
Search is eventually consistent; do not rely on it for immediate delivery confirmation
Use message listing tools for real-time message verification
Common Patterns
Team and Channel ID Resolution
1. Call MICROSOFT_TEAMS_TEAMS_LIST
2. Find team by displayName
3. Extract team id (UUID format)
4. Call MICROSOFT_TEAMS_TEAMS_LIST_CHANNELS with team_id
5. Find channel by displayName
6. Extract channel id (19:...@thread.tacv2 format)
User Resolution
1. Call MICROSOFT_TEAMS_LIST_USERS
2. Filter by displayName or email
3. Extract user id (UUID format)
4. Use for meeting participants, chat members, or team operations
Pagination
Teams/Users: Follow @odata.nextLink URL for next page
Chats: Auto-paginates up to limit; use top for page size (max 50)
Use
top
parameter to control page size
Continue until @odata.nextLink is absent
Known Pitfalls
Authentication and Permissions
:
Different operations require different Microsoft Graph permissions
403 errors indicate insufficient permissions or team access
Some operations require admin consent in the Azure AD tenant
ID Formats
:
Team IDs: UUID format (e.g., '87b0560f-fc0d-4442-add8-b380ca926707')
Channel IDs: Thread format (e.g., '19:abc123@thread.tacv2')
Chat IDs: Various formats (e.g., '19:meeting_xxx@thread.v2')
User IDs: UUID format
Never guess IDs; always resolve from list operations
Rate Limits
:
Microsoft Graph enforces throttling
429 responses include Retry-After header
Keep requests to a few per second
Batch operations help reduce total request count
Message Formatting
:
HTML content_type supports rich formatting
Adaptive cards require additional handling
Message size limit is approximately 28KB
Split long content into multiple messages
Quick Reference
Task
Tool Slug
Key Params
List teams
MICROSOFT_TEAMS_TEAMS_LIST
filter, select, top
Get team details
MICROSOFT_TEAMS_GET_TEAM
team_id
List channels
MICROSOFT_TEAMS_TEAMS_LIST_CHANNELS
team_id, filter
Get channel
MICROSOFT_TEAMS_GET_CHANNEL
team_id, channel_id
Create channel
MICROSOFT_TEAMS_TEAMS_CREATE_CHANNEL
team_id, displayName
Post to channel
MICROSOFT_TEAMS_TEAMS_POST_CHANNEL_MESSAGE
team_id, channel_id, content
List chats
MICROSOFT_TEAMS_CHATS_GET_ALL_CHATS
user_id, limit
Create chat
MICROSOFT_TEAMS_TEAMS_CREATE_CHAT
chatType, members, topic
Post to chat
MICROSOFT_TEAMS_TEAMS_POST_CHAT_MESSAGE
chat_id, content
Create meeting
MICROSOFT_TEAMS_CREATE_MEETING
subject, start_date_time, end_date_time
List users
MICROSOFT_TEAMS_LIST_USERS
filter, select, top
List team members
MICROSOFT_TEAMS_LIST_TEAM_MEMBERS
team_id
Add team member
MICROSOFT_TEAMS_ADD_MEMBER_TO_TEAM
team_id, user_id
Search messages
MICROSOFT_TEAMS_SEARCH_MESSAGES
query
Get chat message
MICROSOFT_TEAMS_GET_CHAT_MESSAGE
chat_id, message_id
List joined teams
MICROSOFT_TEAMS_LIST_USER_JOINED_TEAMS
(none)
Powered by
Composio