@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
md 128 lines 6.35 KB
Rendered Raw
1 ---
2 type: "reference"
3 title: "Microsoft Teams"
4 description: "Public support knowledge for Microsoft Teams."
5 category: "auth-config"
6 visibility: "public"
7 timestamp: "2026-06-24T00:00:00Z"
8 tags:
9 - "microsoft_teams"
10 ---
11 # Microsoft Teams
12
13
14 ## Microsoft Teams delegated permissions should be checked with `get_scopes_required` and `toolkit_versions[microsoft_teams]=latest`
15
16 For Microsoft Teams scope checks, call `/api/v3/tools/get_scopes_required` with the exact tool slug and include `toolkit_versions[microsoft_teams]=latest` when needed. Without the explicit toolkit version, the API may return data from the old `00000000_00` version.
17
18 ## Invalid OAuth scope: `ChannelMessage.Read.Group`
19
20 If Microsoft Teams OAuth fails before consent with:
21
22 ```text
23 AADSTS650053: The application asked for scope 'ChannelMessage.Read.Group' that doesn't exist on the resource Microsoft Graph.
24 ```
25
26 treat `ChannelMessage.Read.Group` as the wrong auth layer for the Composio delegated OAuth flow. It is a Microsoft Teams resource-specific consent (RSC) permission, not a normal Microsoft Graph OAuth scope to include in an OAuth `/authorize` URL.
27
28 Debug steps:
29
30 - Check whether the customer is using v3 base/default tool metadata or old Teams slugs.
31
32 - `MICROSOFT_TEAMS_TEAMS_GET_MESSAGE` on v3 base can return `ChannelMessage.Read.Group`; the latest/v3.1 replacement is `MICROSOFT_TEAMS_GET_CHANNEL_MESSAGE`.
33
34 - Ask the customer to use v3.1 or pass `toolkit_versions[microsoft_teams]=latest` when fetching tools/scopes.
35
36 - Remove `ChannelMessage.Read.Group` from the OAuth auth config scopes and use `ChannelMessage.Read.All`, `Group.Read.All`, or `Group.ReadWrite.All` according to the latest tool scope response.
37
38 - If an existing auth config already includes the invalid scope, update or recreate it and reconnect. Existing connected accounts may need refresh/reconnect depending on how the customer propagates scope changes.
39
40 ### Compare the legacy response
41
42 #### Python
43
44 > [!NOTE]
45 > The Python SDK does not select the legacy `/api/v3` metadata route. Use the API option to reproduce this route-specific stale response.
46
47 #### TypeScript
48
49 > [!NOTE]
50 > The TypeScript SDK does not select the legacy `/api/v3` metadata route. Use the API option to reproduce this route-specific stale response.
51
52 #### API
53
54 <!-- code-example: unchecked-api rule="api-legacy-version" operation="GET /api/v3/tools/{tool_slug}" reason="This diagnostic intentionally reproduces the stale v3 metadata route; the clean example below uses v3.1." -->
55
56 ```bash
57 curl --globoff 'https://backend.composio.dev/api/v3/tools/MICROSOFT_TEAMS_TEAMS_GET_MESSAGE' \
58 -H "x-api-key: $COMPOSIO_API_KEY"
59 ```
60
61 <!-- end-languages -->
62
63 Expected stale response includes `version: "00000000_00"` and `scopes: ["ChannelMessage.Read.Group"]`.
64
65 ### Fetch current tool metadata
66
67 #### Python
68
69 ```python
70 from composio import Composio
71
72 composio = Composio(toolkit_versions={"microsoft_teams": "latest"})
73 tool = composio.tools.get_raw_composio_tool_by_slug("MICROSOFT_TEAMS_GET_CHANNEL_MESSAGE")
74 print(tool.scopes)
75 ```
76
77 #### TypeScript
78
79 ```typescript
80 import { Composio } from "@composio/core";
81
82 const composio = new Composio({ toolkitVersions: { microsoft_teams: "latest" } });
83 const tool = await composio.tools.getRawComposioToolBySlug("MICROSOFT_TEAMS_GET_CHANNEL_MESSAGE");
84 console.log(tool.scopes);
85 ```
86
87 #### API
88
89 ```bash
90 curl --globoff 'https://backend.composio.dev/api/v3.1/tools/MICROSOFT_TEAMS_GET_CHANNEL_MESSAGE?toolkit_versions%5Bmicrosoft_teams%5D=latest' \
91 -H "x-api-key: $COMPOSIO_API_KEY"
92 ```
93
94 <!-- end-languages -->
95
96 Expected clean response includes `ChannelMessage.Read.All`, not `ChannelMessage.Read.Group`.
97
98 ## `MICROSOFT_TEAMS_CHATS_GET_ALL_CHATS` and `MICROSOFT_TEAMS_CREATE_MEETING` can work with delegated user scopes
99
100 `MICROSOFT_TEAMS_CHATS_GET_ALL_CHATS` can use `Chat.ReadBasic`, `Chat.Read`, or `Chat.ReadWrite`. `MICROSOFT_TEAMS_CREATE_MEETING` requires `OnlineMeetings.ReadWrite`. Confirm exact required scopes with the latest versioned scope endpoint before changing auth config scopes.
101
102 ## Microsoft Teams often needs customer-owned Azure OAuth credentials and tenant admin consent
103
104 For Microsoft Teams, recommend using the customer's own Azure/Microsoft developer app credentials when custom scopes are needed. Additional scopes should be added in the Microsoft app, and admin consent may need to be granted in Azure before the connection has usable permissions.
105
106 ## Microsoft Teams one-on-one chat creation needs two users and correct OData bind format
107
108 For Microsoft Teams one-on-one chat creation, pass two users, not one. Also make sure the OData bind payload uses the correct role and bind-data format expected by Microsoft Graph.
109
110 ## Microsoft Teams MCP access is tied to the connected account `user_id` used in the MCP URL
111
112 For Microsoft Teams MCP, the user ID in the MCP server URL/query params must match the user ID attached to the connected account. If the connection is bound to an email/GUID, use that value in the MCP URL or create a new server/connection with the desired user ID.
113
114 ## Teams chat tools return 400/403/404 when user IDs or chat membership do not match Microsoft Graph expectations
115
116 For `MICROSOFT_TEAMS_LIST_USER_CHAT_MESSAGES`, a 400 commonly means `user_id` was not passed as a GUID or UPN. For chat members tools, 403/404 often means the connected user is not part of the meeting chat or the chat ID is not in that user's scope. Use `MICROSOFT_TEAMS_LIST_USERS` to find valid user IDs and verify the connected user is a participant in the target chat.
117
118 ## Microsoft Teams tool listing may return only 20 tools unless `limit` is increased
119
120 When fetching Microsoft Teams tools by toolkit, the default list may return only 20 tools. Increase the `limit` parameter or search for exact tool slugs to retrieve the full set.
121
122 ## Some Microsoft Teams slugs were restored as deprecated aliases with replacement descriptions
123
124 Some old Microsoft Teams slugs were deleted during cleanup and then restored with a deprecated flag and descriptions pointing to the correct replacement slugs. If a Teams slug suddenly disappears or changes, check the latest toolkit version/changelog and prefer the replacement slug.
125
126 ## Tool Router memory for Microsoft Teams should be a list under the toolkit key
127
128 When passing Tool Router memory for Microsoft Teams, use a real list under the `microsoft_teams` key, for example `"memory": { "microsoft_teams": ["Session id..."] }`. Do not pass escaped square brackets as a string.