{"id":30,"date":"2026-03-21T22:47:14","date_gmt":"2026-03-21T14:47:14","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-msteams\/"},"modified":"2026-03-21T23:29:11","modified_gmt":"2026-03-21T15:29:11","slug":"channels-msteams","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-msteams\/","title":{"rendered":"Microsoft Teams"},"content":{"rendered":"<h1>Microsoft Teams<\/h1>\n<h1>Microsoft Teams\uff08\u63d2\u4ef6\uff09<\/h1>\n<blockquote>\n<p>&#8220;\u8fdb\u5165\u6b64\u5730\u8005\uff0c\u653e\u5f03\u4e00\u5207\u5e0c\u671b\u3002&#8221;<\/p>\n<\/blockquote>\n<p>\u66f4\u65b0\u65f6\u95f4\uff1a2026-01-21<\/p>\n<p>\u72b6\u6001\uff1a\u652f\u6301\u6587\u672c + \u79c1\u4fe1\u9644\u4ef6\uff1b\u9891\u9053\/\u7fa4\u7ec4\u6587\u4ef6\u53d1\u9001\u9700\u8981 <code>sharePointSiteId<\/code> + Graph \u6743\u9650\uff08\u53c2\u89c1<a href=\"#sending-files-in-group-chats\">\u5728\u7fa4\u804a\u4e2d\u53d1\u9001\u6587\u4ef6<\/a>\uff09\u3002\u6295\u7968\u901a\u8fc7 Adaptive Cards \u53d1\u9001\u3002<\/p>\n<h2>\u9700\u8981\u63d2\u4ef6<\/h2>\n<p>Microsoft Teams \u4f5c\u4e3a\u63d2\u4ef6\u63d0\u4f9b\uff0c\u4e0d\u5305\u542b\u5728\u6838\u5fc3\u5b89\u88c5\u4e2d\u3002<\/p>\n<p><strong>\u7834\u574f\u6027\u53d8\u66f4\uff082026.1.15\uff09\uff1a<\/strong> MS Teams \u5df2\u4ece\u6838\u5fc3\u79fb\u51fa\u3002\u5982\u679c\u4f60\u4f7f\u7528\u5b83\uff0c\u5fc5\u987b\u5b89\u88c5\u63d2\u4ef6\u3002<\/p>\n<p>\u539f\u56e0\u8bf4\u660e\uff1a\u4fdd\u6301\u6838\u5fc3\u5b89\u88c5\u66f4\u8f7b\u91cf\uff0c\u5e76\u8ba9 MS Teams \u4f9d\u8d56\u9879\u53ef\u4ee5\u72ec\u7acb\u66f4\u65b0\u3002<\/p>\n<p>\u901a\u8fc7 CLI \u5b89\u88c5\uff08npm \u6ce8\u518c\u8868\uff09\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw plugins install @openclaw\/msteams<\/p>\n<pre><code>\n\u672c\u5730\u68c0\u51fa\uff08\u4ece git \u4ed3\u5e93\u8fd0\u884c\u65f6\uff09\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw plugins install .\/extensions\/msteams\n<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u5728\u914d\u7f6e\/\u65b0\u624b\u5f15\u5bfc\u8fc7\u7a0b\u4e2d\u9009\u62e9 Teams \u5e76\u68c0\u6d4b\u5230 git \u68c0\u51fa\uff0c<br \/>\nOpenClaw \u5c06\u81ea\u52a8\u63d0\u4f9b\u672c\u5730\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<p>\u8be6\u60c5\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=289\">\u63d2\u4ef6<\/a><\/p>\n<h2>\u5feb\u901f\u8bbe\u7f6e\uff08\u521d\u5b66\u8005\uff09<\/h2>\n<ol>\n<li>\u5b89\u88c5 Microsoft Teams \u63d2\u4ef6\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a <strong>Azure Bot<\/strong>\uff08App ID + \u5ba2\u6237\u7aef\u5bc6\u94a5 + \u79df\u6237 ID\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u8fd9\u4e9b\u51ed\u8bc1\u914d\u7f6e OpenClaw\u3002<\/li>\n<li>\u901a\u8fc7\u516c\u5171 URL \u6216\u96a7\u9053\u66b4\u9732 <code>\/api\/messages<\/code>\uff08\u9ed8\u8ba4\u7aef\u53e3 3978\uff09\u3002<\/li>\n<li>\u5b89\u88c5 Teams \u5e94\u7528\u5305\u5e76\u542f\u52a8 Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/li>\n<\/ol>\n<p>\u6700\u5c0f\u914d\u7f6e\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    msteams: {<br \/>\n      enabled: true,<br \/>\n      appId: &#8220;&#8221;,<br \/>\n      appPassword: &#8220;&#8221;,<br \/>\n      tenantId: &#8220;&#8221;,<br \/>\n      webhook: { port: 3978, path: &#8220;\/api\/messages&#8221; },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u6ce8\u610f\uff1a\u7fa4\u804a\u9ed8\u8ba4\u88ab\u963b\u6b62\uff08`channels.msteams.groupPolicy: &quot;allowlist&quot;`\uff09\u3002\u8981\u5141\u8bb8\u7fa4\u7ec4\u56de\u590d\uff0c\u8bf7\u8bbe\u7f6e `channels.msteams.groupAllowFrom`\uff08\u6216\u4f7f\u7528 `groupPolicy: &quot;open&quot;` \u5141\u8bb8\u4efb\u4f55\u6210\u5458\uff0c\u9700\u8981\u63d0\u53ca\u624d\u80fd\u89e6\u53d1\uff09\u3002\n\n## \u76ee\u6807\n\n* \u901a\u8fc7 Teams \u79c1\u4fe1\u3001\u7fa4\u804a\u6216\u9891\u9053\u4e0e OpenClaw \u4ea4\u6d41\u3002\n* \u4fdd\u6301\u8def\u7531\u786e\u5b9a\u6027\uff1a\u56de\u590d\u59cb\u7ec8\u8fd4\u56de\u5230\u6d88\u606f\u5230\u8fbe\u7684\u6e20\u9053\u3002\n* \u9ed8\u8ba4\u4f7f\u7528\u5b89\u5168\u7684\u6e20\u9053\u884c\u4e3a\uff08\u9664\u975e\u53e6\u6709\u914d\u7f6e\uff0c\u5426\u5219\u9700\u8981\u63d0\u53ca\uff09\u3002\n\n## \u914d\u7f6e\u5199\u5165\n\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cMicrosoft Teams \u5141\u8bb8\u901a\u8fc7 `\/config set|unset` \u89e6\u53d1\u7684\u914d\u7f6e\u66f4\u65b0\u5199\u5165\uff08\u9700\u8981 `commands.config: true`\uff09\u3002\n\n\u7981\u7528\u65b9\u5f0f\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: { msteams: { configWrites: false } },\n}\n<\/code><\/pre>\n<h2>\u8bbf\u95ee\u63a7\u5236\uff08\u79c1\u4fe1 + \u7fa4\u7ec4\uff09<\/h2>\n<p><strong>\u79c1\u4fe1\u8bbf\u95ee<\/strong><\/p>\n<ul>\n<li>\u9ed8\u8ba4\uff1a<code>channels.msteams.dmPolicy = \"pairing\"<\/code>\u3002\u672a\u77e5\u53d1\u9001\u8005\u5728\u83b7\u5f97\u6279\u51c6\u4e4b\u524d\u5c06\u88ab\u5ffd\u7565\u3002<\/li>\n<li><code>channels.msteams.allowFrom<\/code> \u63a5\u53d7 AAD \u5bf9\u8c61 ID\u3001UPN \u6216\u663e\u793a\u540d\u79f0\u3002\u5f53\u51ed\u8bc1\u5141\u8bb8\u65f6\uff0c\u5411\u5bfc\u4f1a\u901a\u8fc7 Microsoft Graph \u5c06\u540d\u79f0\u89e3\u6790\u4e3a ID\u3002<\/li>\n<\/ul>\n<p><strong>\u7fa4\u7ec4\u8bbf\u95ee<\/strong><\/p>\n<ul>\n<li>\u9ed8\u8ba4\uff1a<code>channels.msteams.groupPolicy = \"allowlist\"<\/code>\uff08\u9664\u975e\u6dfb\u52a0 <code>groupAllowFrom<\/code>\uff0c\u5426\u5219\u88ab\u963b\u6b62\uff09\u3002\u4f7f\u7528 <code>channels.defaults.groupPolicy<\/code> \u5728\u672a\u8bbe\u7f6e\u65f6\u8986\u76d6\u9ed8\u8ba4\u503c\u3002<\/li>\n<li><code>channels.msteams.groupAllowFrom<\/code> \u63a7\u5236\u54ea\u4e9b\u53d1\u9001\u8005\u53ef\u4ee5\u5728\u7fa4\u804a\/\u9891\u9053\u4e2d\u89e6\u53d1\uff08\u56de\u9000\u5230 <code>channels.msteams.allowFrom<\/code>\uff09\u3002<\/li>\n<li>\u8bbe\u7f6e <code>groupPolicy: \"open\"<\/code> \u5141\u8bb8\u4efb\u4f55\u6210\u5458\uff08\u9ed8\u8ba4\u4ecd\u9700\u63d0\u53ca\u624d\u80fd\u89e6\u53d1\uff09\u3002<\/li>\n<li>\u8981<strong>\u4e0d\u5141\u8bb8\u4efb\u4f55\u9891\u9053<\/strong>\uff0c\u8bbe\u7f6e <code>channels.msteams.groupPolicy: \"disabled\"<\/code>\u3002<\/li>\n<\/ul>\n<p>\u793a\u4f8b\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    msteams: {<br \/>\n      groupPolicy: &#8220;allowlist&#8221;,<br \/>\n      groupAllowFrom: [&#8220;user@org.com&#8221;],<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n**\u56e2\u961f + \u9891\u9053\u5141\u8bb8\u5217\u8868**\n\n* \u901a\u8fc7\u5728 `channels.msteams.teams` \u4e0b\u5217\u51fa\u56e2\u961f\u548c\u9891\u9053\u6765\u9650\u5b9a\u7fa4\u7ec4\/\u9891\u9053\u56de\u590d\u7684\u8303\u56f4\u3002\n* \u952e\u53ef\u4ee5\u662f\u56e2\u961f ID \u6216\u540d\u79f0\uff1b\u9891\u9053\u952e\u53ef\u4ee5\u662f\u4f1a\u8bdd ID \u6216\u540d\u79f0\u3002\n* \u5f53 `groupPolicy=&quot;allowlist&quot;` \u4e14\u5b58\u5728\u56e2\u961f\u5141\u8bb8\u5217\u8868\u65f6\uff0c\u4ec5\u63a5\u53d7\u5217\u51fa\u7684\u56e2\u961f\/\u9891\u9053\uff08\u9700\u8981\u63d0\u53ca\u624d\u80fd\u89e6\u53d1\uff09\u3002\n* \u914d\u7f6e\u5411\u5bfc\u63a5\u53d7 `Team\/Channel` \u6761\u76ee\u5e76\u4e3a\u4f60\u5b58\u50a8\u3002\n* \u542f\u52a8\u65f6\uff0cOpenClaw \u5c06\u56e2\u961f\/\u9891\u9053\u548c\u7528\u6237\u5141\u8bb8\u5217\u8868\u540d\u79f0\u89e3\u6790\u4e3a ID\uff08\u5f53 Graph \u6743\u9650\u5141\u8bb8\u65f6\uff09\n  \u5e76\u8bb0\u5f55\u6620\u5c04\uff1b\u672a\u89e3\u6790\u7684\u6761\u76ee\u4fdd\u6301\u539f\u6837\u3002\n\n\u793a\u4f8b\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    msteams: {\n      groupPolicy: &quot;allowlist&quot;,\n      teams: {\n        &quot;My Team&quot;: {\n          channels: {\n            General: { requireMention: true },\n          },\n        },\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<h2>\u5de5\u4f5c\u539f\u7406<\/h2>\n<ol>\n<li>\u5b89\u88c5 Microsoft Teams \u63d2\u4ef6\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a <strong>Azure Bot<\/strong>\uff08App ID + \u5bc6\u94a5 + \u79df\u6237 ID\uff09\u3002<\/li>\n<li>\u6784\u5efa\u4e00\u4e2a\u5f15\u7528\u673a\u5668\u4eba\u5e76\u5305\u542b\u4ee5\u4e0b RSC \u6743\u9650\u7684 <strong>Teams \u5e94\u7528\u5305<\/strong>\u3002<\/li>\n<li>\u5c06 Teams \u5e94\u7528\u4e0a\u4f20\/\u5b89\u88c5\u5230\u56e2\u961f\u4e2d\uff08\u6216\u7528\u4e8e\u79c1\u4fe1\u7684\u4e2a\u4eba\u8303\u56f4\uff09\u3002<\/li>\n<li>\u5728 <code>~\/.openclaw\/openclaw.json<\/code>\uff08\u6216\u73af\u5883\u53d8\u91cf\uff09\u4e2d\u914d\u7f6e <code>msteams<\/code> \u5e76\u542f\u52a8 Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/li>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u9ed8\u8ba4\u5728 <code>\/api\/messages<\/code> \u4e0a\u76d1\u542c Bot Framework webhook \u6d41\u91cf\u3002<\/li>\n<\/ol>\n<h2>Azure Bot \u8bbe\u7f6e\uff08\u524d\u63d0\u6761\u4ef6\uff09<\/h2>\n<p>\u5728\u914d\u7f6e OpenClaw \u4e4b\u524d\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a Azure Bot \u8d44\u6e90\u3002<\/p>\n<h3>\u6b65\u9aa4 1\uff1a\u521b\u5efa Azure Bot<\/h3>\n<ol>\n<li>\u524d\u5f80<a href=\"https:\/\/portal.azure.com\/#create\/Microsoft.AzureBot\">\u521b\u5efa Azure Bot<\/a><\/li>\n<li>\u586b\u5199<strong>\u57fa\u672c\u4fe1\u606f<\/strong>\u9009\u9879\u5361\uff1a<\/li>\n<\/ol>\n<table>\n<thead>\n<tr>\n<th>\u5b57\u6bb5<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Bot handle<\/strong><\/td>\n<td>\u4f60\u7684\u673a\u5668\u4eba\u540d\u79f0\uff0c\u4f8b\u5982 <code>openclaw-msteams<\/code>\uff08\u5fc5\u987b\u552f\u4e00\uff09<\/td>\n<\/tr>\n<tr>\n<td><strong>Subscription<\/strong><\/td>\n<td>\u9009\u62e9\u4f60\u7684 Azure \u8ba2\u9605<\/td>\n<\/tr>\n<tr>\n<td><strong>Resource group<\/strong><\/td>\n<td>\u65b0\u5efa\u6216\u4f7f\u7528\u73b0\u6709<\/td>\n<\/tr>\n<tr>\n<td><strong>Pricing tier<\/strong><\/td>\n<td><strong>Free<\/strong> \u7528\u4e8e\u5f00\u53d1\/\u6d4b\u8bd5<\/td>\n<\/tr>\n<tr>\n<td><strong>Type of App<\/strong><\/td>\n<td><strong>Single Tenant<\/strong>\uff08\u63a8\u8350 &#8211; \u89c1\u4e0b\u65b9\u8bf4\u660e\uff09<\/td>\n<\/tr>\n<tr>\n<td><strong>Creation type<\/strong><\/td>\n<td><strong>Create new Microsoft App ID<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p><strong>\u5f03\u7528\u901a\u77e5\uff1a<\/strong> 2025-07-31 \u4e4b\u540e\u5df2\u5f03\u7528\u521b\u5efa\u65b0\u7684\u591a\u79df\u6237\u673a\u5668\u4eba\u3002\u65b0\u673a\u5668\u4eba\u8bf7\u4f7f\u7528 <strong>Single Tenant<\/strong>\u3002<\/p>\n<\/blockquote>\n<ol start=\"3\">\n<li>\u70b9\u51fb <strong>Review + create<\/strong> \u2192 <strong>Create<\/strong>\uff08\u7b49\u5f85\u7ea6 1-2 \u5206\u949f\uff09<\/li>\n<\/ol>\n<h3>\u6b65\u9aa4 2\uff1a\u83b7\u53d6\u51ed\u8bc1<\/h3>\n<ol>\n<li>\u524d\u5f80\u4f60\u7684 Azure Bot \u8d44\u6e90 \u2192 <strong>\u914d\u7f6e\u8bf4\u660e<\/strong><\/li>\n<li>\u590d\u5236 <strong>Microsoft App ID<\/strong> \u2192 \u8fd9\u662f\u4f60\u7684 <code>appId<\/code><\/li>\n<li>\u70b9\u51fb <strong>Manage Password<\/strong> \u2192 \u524d\u5f80\u5e94\u7528\u6ce8\u518c<\/li>\n<li>\u5728 <strong>Certificates &amp; secrets<\/strong> \u2192 <strong>New client secret<\/strong> \u2192 \u590d\u5236 <strong>Value<\/strong> \u2192 \u8fd9\u662f\u4f60\u7684 <code>appPassword<\/code><\/li>\n<li>\u524d\u5f80 <strong>Overview<\/strong> \u2192 \u590d\u5236 <strong>Directory (tenant) ID<\/strong> \u2192 \u8fd9\u662f\u4f60\u7684 <code>tenantId<\/code><\/li>\n<\/ol>\n<h3>\u6b65\u9aa4 3\uff1a\u914d\u7f6e\u6d88\u606f\u7aef\u70b9<\/h3>\n<ol>\n<li>\u5728 Azure Bot \u2192 <strong>\u914d\u7f6e\u8bf4\u660e<\/strong><\/li>\n<li>\u5c06 <strong>Messaging endpoint<\/strong> \u8bbe\u7f6e\u4e3a\u4f60\u7684 webhook URL\uff1a<br \/>\n   * \u751f\u4ea7\u73af\u5883\uff1a<code>https:\/\/your-domain.com\/api\/messages<\/code><br \/>\n   * \u672c\u5730\u5f00\u53d1\uff1a\u4f7f\u7528\u96a7\u9053\uff08\u89c1\u4e0b\u65b9<a href=\"#local-development-tunneling\">\u672c\u5730\u5f00\u53d1<\/a>\uff09<\/li>\n<\/ol>\n<h3>\u6b65\u9aa4 4\uff1a\u542f\u7528 Teams \u6e20\u9053<\/h3>\n<ol>\n<li>\u5728 Azure Bot \u2192 <strong>Channels<\/strong><\/li>\n<li>\u70b9\u51fb <strong>Microsoft Teams<\/strong> \u2192 Configure \u2192 Save<\/li>\n<li>\u63a5\u53d7\u670d\u52a1\u6761\u6b3e<\/li>\n<\/ol>\n<h2>\u672c\u5730\u5f00\u53d1\uff08\u96a7\u9053\uff09<\/h2>\n<p>Teams \u65e0\u6cd5\u8bbf\u95ee <code>localhost<\/code>\u3002\u672c\u5730\u5f00\u53d1\u8bf7\u4f7f\u7528\u96a7\u9053\uff1a<\/p>\n<p><strong>\u9009\u9879 A\uff1angrok<\/strong><\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nngrok http 3978<\/p>\n<h1>\u590d\u5236 https URL\uff0c\u4f8b\u5982 https:\/\/abc123.ngrok.io<\/h1>\n<h1>\u5c06\u6d88\u606f\u7aef\u70b9\u8bbe\u7f6e\u4e3a\uff1ahttps:\/\/abc123.ngrok.io\/api\/messages<\/h1>\n<pre><code>\n**\u9009\u9879 B\uff1aTailscale Funnel**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\ntailscale funnel 3978\n# \u4f7f\u7528\u4f60\u7684 Tailscale funnel URL \u4f5c\u4e3a\u6d88\u606f\u7aef\u70b9\n<\/code><\/pre>\n<h2>Teams \u5f00\u53d1\u8005\u95e8\u6237\uff08\u66ff\u4ee3\u65b9\u6848\uff09<\/h2>\n<p>\u9664\u4e86\u624b\u52a8\u521b\u5efa\u6e05\u5355 ZIP\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 <a href=\"https:\/\/dev.teams.microsoft.com\/apps\">Teams \u5f00\u53d1\u8005\u95e8\u6237<\/a>\uff1a<\/p>\n<ol>\n<li>\u70b9\u51fb <strong>+ New app<\/strong><\/li>\n<li>\u586b\u5199\u57fa\u672c\u4fe1\u606f\uff08\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u5f00\u53d1\u8005\u4fe1\u606f\uff09<\/li>\n<li>\u524d\u5f80 <strong>App features<\/strong> \u2192 <strong>Bot<\/strong><\/li>\n<li>\u9009\u62e9 <strong>Enter a bot ID manually<\/strong> \u5e76\u7c98\u8d34\u4f60\u7684 Azure Bot App ID<\/li>\n<li>\u52fe\u9009\u8303\u56f4\uff1a<strong>Personal<\/strong>\u3001<strong>Team<\/strong>\u3001<strong>Group Chat<\/strong><\/li>\n<li>\u70b9\u51fb <strong>Distribute<\/strong> \u2192 <strong>Download app package<\/strong><\/li>\n<li>\u5728 Teams \u4e2d\uff1a<strong>Apps<\/strong> \u2192 <strong>Manage your apps<\/strong> \u2192 <strong>Upload a custom app<\/strong> \u2192 \u9009\u62e9 ZIP<\/li>\n<\/ol>\n<p>\u8fd9\u901a\u5e38\u6bd4\u624b\u52a8\u7f16\u8f91 JSON \u6e05\u5355\u66f4\u5bb9\u6613\u3002<\/p>\n<h2>\u6d4b\u8bd5\u673a\u5668\u4eba<\/h2>\n<p><strong>\u9009\u9879 A\uff1aAzure Web Chat\uff08\u5148\u9a8c\u8bc1 webhook\uff09<\/strong><\/p>\n<ol>\n<li>\u5728 Azure \u95e8\u6237 \u2192 \u4f60\u7684 Azure Bot \u8d44\u6e90 \u2192 <strong>Test in Web Chat<\/strong><\/li>\n<li>\u53d1\u9001\u4e00\u6761\u6d88\u606f &#8211; \u4f60\u5e94\u8be5\u770b\u5230\u54cd\u5e94<\/li>\n<li>\u8fd9\u786e\u8ba4\u4f60\u7684 webhook \u7aef\u70b9\u5728 Teams \u8bbe\u7f6e\u4e4b\u524d\u6b63\u5e38\u5de5\u4f5c<\/li>\n<\/ol>\n<p><strong>\u9009\u9879 B\uff1aTeams\uff08\u5e94\u7528\u5b89\u88c5\u540e\uff09<\/strong><\/p>\n<ol>\n<li>\u5b89\u88c5 Teams \u5e94\u7528\uff08\u4fa7\u8f7d\u6216\u7ec4\u7ec7\u76ee\u5f55\uff09<\/li>\n<li>\u5728 Teams \u4e2d\u627e\u5230\u673a\u5668\u4eba\u5e76\u53d1\u9001\u79c1\u4fe1<\/li>\n<li>\u68c0\u67e5 Gateway \u7f51\u5173 \u7f51\u5173\u65e5\u5fd7\u4e2d\u7684\u4f20\u5165\u6d3b\u52a8<\/li>\n<\/ol>\n<h2>\u8bbe\u7f6e\uff08\u6700\u5c0f\u7eaf\u6587\u672c\uff09<\/h2>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5 Microsoft Teams \u63d2\u4ef6<\/strong><br \/>\n   * \u4ece npm\uff1a<code>openclaw plugins install @openclaw\/msteams<\/code><br \/>\n   * \u4ece\u672c\u5730\u68c0\u51fa\uff1a<code>openclaw plugins install .\/extensions\/msteams<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u673a\u5668\u4eba\u6ce8\u518c<\/strong><br \/>\n   * \u521b\u5efa\u4e00\u4e2a Azure Bot\uff08\u89c1\u4e0a\u6587\uff09\u5e76\u8bb0\u5f55\uff1a<\/p>\n<ul>\n<li>App ID<\/li>\n<li>\u5ba2\u6237\u7aef\u5bc6\u94a5\uff08App password\uff09<\/li>\n<li>\u79df\u6237 ID\uff08\u5355\u79df\u6237\uff09<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Teams \u5e94\u7528\u6e05\u5355<\/strong><br \/>\n   * \u5305\u542b\u4e00\u4e2a <code>bot<\/code> \u6761\u76ee\uff0c\u5176\u4e2d <code>botId = &lt;App ID&gt;<\/code>\u3002<br \/>\n   * \u8303\u56f4\uff1a<code>personal<\/code>\u3001<code>team<\/code>\u3001<code>groupChat<\/code>\u3002<br \/>\n   * <code>supportsFiles: true<\/code>\uff08\u4e2a\u4eba\u8303\u56f4\u6587\u4ef6\u5904\u7406\u6240\u9700\uff09\u3002<br \/>\n   * \u6dfb\u52a0 RSC \u6743\u9650\uff08\u89c1\u4e0b\u6587\uff09\u3002<br \/>\n   * \u521b\u5efa\u56fe\u6807\uff1a<code>outline.png<\/code>\uff0832&#215;32\uff09\u548c <code>color.png<\/code>\uff08192&#215;192\uff09\u3002<br \/>\n   * \u5c06\u4e09\u4e2a\u6587\u4ef6\u4e00\u8d77\u6253\u5305\uff1a<code>manifest.json<\/code>\u3001<code>outline.png<\/code>\u3001<code>color.png<\/code>\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e OpenClaw<\/strong><\/p>\n<\/li>\n<\/ol>\n<p><code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n   {<br \/>\n     \"msteams\": {<br \/>\n       \"enabled\": true,<br \/>\n       \"appId\": \"&lt;APP_ID&gt;\",<br \/>\n       \"appPassword\": \"&lt;APP_PASSWORD&gt;\",<br \/>\n       \"tenantId\": \"&lt;TENANT_ID&gt;\",<br \/>\n       \"webhook\": { \"port\": 3978, \"path\": \"\/api\/messages\" }<br \/>\n     }<br \/>\n   }<\/code><\/p>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u4ee3\u66ff\u914d\u7f6e\u952e\uff1a<\/p>\n<ul>\n<li><code>MSTEAMS_APP_ID<\/code><\/li>\n<li><code>MSTEAMS_APP_PASSWORD<\/code><\/li>\n<li><code>MSTEAMS_TENANT_ID<\/code><\/li>\n<\/ul>\n<ol start=\"5\">\n<li>\n<p><strong>\u673a\u5668\u4eba\u7aef\u70b9<\/strong><br \/>\n   * \u5c06 Azure Bot Messaging Endpoint \u8bbe\u7f6e\u4e3a\uff1a<\/p>\n<ul>\n<li><code>https:\/\/&lt;host&gt;:3978\/api\/messages<\/code>\uff08\u6216\u4f60\u9009\u62e9\u7684\u8def\u5f84\/\u7aef\u53e3\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c Gateway \u7f51\u5173 \u7f51\u5173<\/strong><br \/>\n   * \u5f53\u63d2\u4ef6\u5df2\u5b89\u88c5\u4e14 <code>msteams<\/code> \u914d\u7f6e\u5b58\u5728\u5e76\u6709\u51ed\u8bc1\u65f6\uff0cTeams \u6e20\u9053\u4f1a\u81ea\u52a8\u542f\u52a8\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u5386\u53f2\u4e0a\u4e0b\u6587<\/h2>\n<ul>\n<li><code>channels.msteams.historyLimit<\/code> \u63a7\u5236\u5c06\u591a\u5c11\u6761\u6700\u8fd1\u7684\u9891\u9053\/\u7fa4\u7ec4\u6d88\u606f\u5305\u542b\u5230\u63d0\u793a\u4e2d\u3002<\/li>\n<li>\u56de\u9000\u5230 <code>messages.groupChat.historyLimit<\/code>\u3002\u8bbe\u7f6e <code>0<\/code> \u7981\u7528\uff08\u9ed8\u8ba4 50\uff09\u3002<\/li>\n<li>\u79c1\u4fe1\u5386\u53f2\u53ef\u4ee5\u901a\u8fc7 <code>channels.msteams.dmHistoryLimit<\/code>\uff08\u7528\u6237\u8f6e\u6b21\uff09\u9650\u5236\u3002\u6bcf\u7528\u6237\u8986\u76d6\uff1a<code>channels.msteams.dms[\"&lt;user_id&gt;\"].historyLimit<\/code>\u3002<\/li>\n<\/ul>\n<h2>\u5f53\u524d Teams RSC \u6743\u9650\uff08\u6e05\u5355\uff09<\/h2>\n<p>\u8fd9\u4e9b\u662f\u6211\u4eec Teams \u5e94\u7528\u6e05\u5355\u4e2d<strong>\u73b0\u6709\u7684 resourceSpecific \u6743\u9650<\/strong>\u3002\u5b83\u4eec\u4ec5\u9002\u7528\u4e8e\u5b89\u88c5\u4e86\u5e94\u7528\u7684\u56e2\u961f\/\u804a\u5929\u5185\u90e8\u3002<\/p>\n<p><strong>\u5bf9\u4e8e\u9891\u9053\uff08\u56e2\u961f\u8303\u56f4\uff09\uff1a<\/strong><\/p>\n<ul>\n<li><code>ChannelMessage.Read.Group<\/code>\uff08Application\uff09- \u65e0\u9700 @\u63d0\u53ca\u5373\u53ef\u63a5\u6536\u6240\u6709\u9891\u9053\u6d88\u606f<\/li>\n<li><code>ChannelMessage.Send.Group<\/code>\uff08Application\uff09<\/li>\n<li><code>Member.Read.Group<\/code>\uff08Application\uff09<\/li>\n<li><code>Owner.Read.Group<\/code>\uff08Application\uff09<\/li>\n<li><code>ChannelSettings.Read.Group<\/code>\uff08Application\uff09<\/li>\n<li><code>TeamMember.Read.Group<\/code>\uff08Application\uff09<\/li>\n<li><code>TeamSettings.Read.Group<\/code>\uff08Application\uff09<\/li>\n<\/ul>\n<p><strong>\u5bf9\u4e8e\u7fa4\u804a\uff1a<\/strong><\/p>\n<ul>\n<li><code>ChatMessage.Read.Chat<\/code>\uff08Application\uff09- \u65e0\u9700 @\u63d0\u53ca\u5373\u53ef\u63a5\u6536\u6240\u6709\u7fa4\u804a\u6d88\u606f<\/li>\n<\/ul>\n<h2>Teams \u6e05\u5355\u793a\u4f8b\uff08\u5df2\u8131\u654f\uff09<\/h2>\n<p>\u5305\u542b\u5fc5\u9700\u5b57\u6bb5\u7684\u6700\u5c0f\u6709\u6548\u793a\u4f8b\u3002\u8bf7\u66ff\u6362 ID \u548c URL\u3002<\/p>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;$schema&#8221;: &#8220;https:\/\/developer.microsoft.com\/en-us\/json-schemas\/teams\/v1.23\/MicrosoftTeams.schema.json&#8221;,<br \/>\n  &#8220;manifestVersion&#8221;: &#8220;1.23&#8221;,<br \/>\n  &#8220;version&#8221;: &#8220;1.0.0&#8221;,<br \/>\n  &#8220;id&#8221;: &#8220;00000000-0000-0000-0000-000000000000&#8221;,<br \/>\n  &#8220;name&#8221;: { &#8220;short&#8221;: &#8220;OpenClaw&#8221; },<br \/>\n  &#8220;developer&#8221;: {<br \/>\n    &#8220;name&#8221;: &#8220;Your Org&#8221;,<br \/>\n    &#8220;websiteUrl&#8221;: &#8220;https:\/\/example.com&#8221;,<br \/>\n    &#8220;privacyUrl&#8221;: &#8220;https:\/\/example.com\/privacy&#8221;,<br \/>\n    &#8220;termsOfUseUrl&#8221;: &#8220;https:\/\/example.com\/terms&#8221;<br \/>\n  },<br \/>\n  &#8220;description&#8221;: { &#8220;short&#8221;: &#8220;OpenClaw in Teams&#8221;, &#8220;full&#8221;: &#8220;OpenClaw in Teams&#8221; },<br \/>\n  &#8220;icons&#8221;: { &#8220;outline&#8221;: &#8220;outline.png&#8221;, &#8220;color&#8221;: &#8220;color.png&#8221; },<br \/>\n  &#8220;accentColor&#8221;: &#8220;#5B6DEF&#8221;,<br \/>\n  &#8220;bots&#8221;: [<br \/>\n    {<br \/>\n      &#8220;botId&#8221;: &#8220;11111111-1111-1111-1111-111111111111&#8221;,<br \/>\n      &#8220;scopes&#8221;: [&#8220;personal&#8221;, &#8220;team&#8221;, &#8220;groupChat&#8221;],<br \/>\n      &#8220;isNotificationOnly&#8221;: false,<br \/>\n      &#8220;supportsCalling&#8221;: false,<br \/>\n      &#8220;supportsVideo&#8221;: false,<br \/>\n      &#8220;supportsFiles&#8221;: true<br \/>\n    }<br \/>\n  ],<br \/>\n  &#8220;webApplicationInfo&#8221;: {<br \/>\n    &#8220;id&#8221;: &#8220;11111111-1111-1111-1111-111111111111&#8221;<br \/>\n  },<br \/>\n  &#8220;authorization&#8221;: {<br \/>\n    &#8220;permissions&#8221;: {<br \/>\n      &#8220;resourceSpecific&#8221;: [<br \/>\n        { &#8220;name&#8221;: &#8220;ChannelMessage.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;ChannelMessage.Send.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;Member.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;Owner.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;ChannelSettings.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;TeamMember.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;TeamSettings.Read.Group&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; },<br \/>\n        { &#8220;name&#8221;: &#8220;ChatMessage.Read.Chat&#8221;, &#8220;type&#8221;: &#8220;Application&#8221; }<br \/>\n      ]<br \/>\n    }<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n### \u6e05\u5355\u6ce8\u610f\u4e8b\u9879\uff08\u5fc5\u586b\u5b57\u6bb5\uff09\n\n* `bots[].botId` **\u5fc5\u987b**\u4e0e Azure Bot App ID \u5339\u914d\u3002\n* `webApplicationInfo.id` **\u5fc5\u987b**\u4e0e Azure Bot App ID \u5339\u914d\u3002\n* `bots[].scopes` \u5fc5\u987b\u5305\u542b\u4f60\u8ba1\u5212\u4f7f\u7528\u7684\u754c\u9762\uff08`personal`\u3001`team`\u3001`groupChat`\uff09\u3002\n* `bots[].supportsFiles: true` \u662f\u4e2a\u4eba\u8303\u56f4\u6587\u4ef6\u5904\u7406\u6240\u9700\u7684\u3002\n* `authorization.permissions.resourceSpecific` \u5982\u679c\u4f60\u9700\u8981\u9891\u9053\u6d41\u91cf\uff0c\u5fc5\u987b\u5305\u542b\u9891\u9053\u8bfb\u53d6\/\u53d1\u9001\u6743\u9650\u3002\n\n### \u66f4\u65b0\u73b0\u6709\u5e94\u7528\n\n\u8981\u66f4\u65b0\u5df2\u5b89\u88c5\u7684 Teams \u5e94\u7528\uff08\u4f8b\u5982\uff0c\u6dfb\u52a0 RSC \u6743\u9650\uff09\uff1a\n\n1. \u4f7f\u7528\u65b0\u8bbe\u7f6e\u66f4\u65b0\u4f60\u7684 `manifest.json`\n2. **\u589e\u52a0 `version` \u5b57\u6bb5**\uff08\u4f8b\u5982\uff0c`1.0.0` \u2192 `1.1.0`\uff09\n3. **\u91cd\u65b0\u6253\u5305**\u6e05\u5355\u548c\u56fe\u6807\uff08`manifest.json`\u3001`outline.png`\u3001`color.png`\uff09\n4. \u4e0a\u4f20\u65b0\u7684 zip\uff1a\n   * **\u9009\u9879 A\uff08Teams \u7ba1\u7406\u4e2d\u5fc3\uff09\uff1a** Teams \u7ba1\u7406\u4e2d\u5fc3 \u2192 Teams apps \u2192 Manage apps \u2192 \u627e\u5230\u4f60\u7684\u5e94\u7528 \u2192 Upload new version\n   * **\u9009\u9879 B\uff08\u4fa7\u8f7d\uff09\uff1a** \u5728 Teams \u4e2d \u2192 Apps \u2192 Manage your apps \u2192 Upload a custom app\n5. **\u5bf9\u4e8e\u56e2\u961f\u9891\u9053\uff1a** \u5728\u6bcf\u4e2a\u56e2\u961f\u4e2d\u91cd\u65b0\u5b89\u88c5\u5e94\u7528\u4ee5\u4f7f\u65b0\u6743\u9650\u751f\u6548\n6. **\u5b8c\u5168\u9000\u51fa\u5e76\u91cd\u65b0\u542f\u52a8 Teams**\uff08\u4e0d\u4ec5\u4ec5\u662f\u5173\u95ed\u7a97\u53e3\uff09\u4ee5\u6e05\u9664\u7f13\u5b58\u7684\u5e94\u7528\u5143\u6570\u636e\n\n## \u529f\u80fd\uff1a\u4ec5 RSC \u4e0e Graph\n\n### \u4ec5\u4f7f\u7528 **Teams RSC**\uff08\u5e94\u7528\u5df2\u5b89\u88c5\uff0c\u65e0 Graph API \u6743\u9650\uff09\n\n\u53ef\u7528\uff1a\n\n* \u8bfb\u53d6\u9891\u9053\u6d88\u606f**\u6587\u672c**\u5185\u5bb9\u3002\n* \u53d1\u9001\u9891\u9053\u6d88\u606f**\u6587\u672c**\u5185\u5bb9\u3002\n* \u63a5\u6536**\u4e2a\u4eba\uff08\u79c1\u4fe1\uff09**\u6587\u4ef6\u9644\u4ef6\u3002\n\n\u4e0d\u53ef\u7528\uff1a\n\n* \u9891\u9053\/\u7fa4\u7ec4**\u56fe\u7247\u6216\u6587\u4ef6\u5185\u5bb9**\uff08\u8d1f\u8f7d\u4ec5\u5305\u542b HTML \u5b58\u6839\uff09\u3002\n* \u4e0b\u8f7d\u5b58\u50a8\u5728 SharePoint\/OneDrive \u4e2d\u7684\u9644\u4ef6\u3002\n* \u8bfb\u53d6\u6d88\u606f\u5386\u53f2\uff08\u8d85\u51fa\u5b9e\u65f6 webhook \u4e8b\u4ef6\uff09\u3002\n\n### \u4f7f\u7528 **Teams RSC + Microsoft Graph Application \u6743\u9650**\n\n\u589e\u52a0\uff1a\n\n* \u4e0b\u8f7d\u6258\u7ba1\u5185\u5bb9\uff08\u7c98\u8d34\u5230\u6d88\u606f\u4e2d\u7684\u56fe\u7247\uff09\u3002\n* \u4e0b\u8f7d\u5b58\u50a8\u5728 SharePoint\/OneDrive \u4e2d\u7684\u6587\u4ef6\u9644\u4ef6\u3002\n* \u901a\u8fc7 Graph \u8bfb\u53d6\u9891\u9053\/\u804a\u5929\u6d88\u606f\u5386\u53f2\u3002\n\n### RSC \u4e0e Graph API \u5bf9\u6bd4\n\n| \u529f\u80fd        | RSC \u6743\u9650        | Graph API      |\n| --------- | ------------- | -------------- |\n| **\u5b9e\u65f6\u6d88\u606f**  | \u662f\uff08\u901a\u8fc7 webhook\uff09 | \u5426\uff08\u4ec5\u8f6e\u8be2\uff09         |\n| **\u5386\u53f2\u6d88\u606f**  | \u5426             | \u662f\uff08\u53ef\u67e5\u8be2\u5386\u53f2\uff09       |\n| **\u8bbe\u7f6e\u590d\u6742\u5ea6** | \u4ec5\u5e94\u7528\u6e05\u5355         | \u9700\u8981\u7ba1\u7406\u5458\u540c\u610f + \u4ee4\u724c\u6d41\u7a0b |\n| **\u79bb\u7ebf\u5de5\u4f5c**  | \u5426\uff08\u5fc5\u987b\u8fd0\u884c\uff09       | \u662f\uff08\u968f\u65f6\u67e5\u8be2\uff09        |\n\n**\u7ed3\u8bba\uff1a** RSC \u7528\u4e8e\u5b9e\u65f6\u76d1\u542c\uff1bGraph API \u7528\u4e8e\u5386\u53f2\u8bbf\u95ee\u3002\u8981\u5728\u79bb\u7ebf\u65f6\u8865\u4e0a\u9519\u8fc7\u7684\u6d88\u606f\uff0c\u4f60\u9700\u8981\u5e26\u6709 `ChannelMessage.Read.All` \u7684 Graph API\uff08\u9700\u8981\u7ba1\u7406\u5458\u540c\u610f\uff09\u3002\n\n## \u542f\u7528 Graph \u7684\u5a92\u4f53 + \u5386\u53f2\uff08\u9891\u9053\u6240\u9700\uff09\n\n\u5982\u679c\u4f60\u9700\u8981**\u9891\u9053**\u4e2d\u7684\u56fe\u7247\/\u6587\u4ef6\u6216\u60f3\u8981\u83b7\u53d6**\u6d88\u606f\u5386\u53f2**\uff0c\u4f60\u5fc5\u987b\u542f\u7528 Microsoft Graph \u6743\u9650\u5e76\u6388\u4e88\u7ba1\u7406\u5458\u540c\u610f\u3002\n\n1. \u5728 Entra ID\uff08Azure AD\uff09**App Registration** \u4e2d\uff0c\u6dfb\u52a0 Microsoft Graph **Application \u6743\u9650**\uff1a\n   * `ChannelMessage.Read.All`\uff08\u9891\u9053\u9644\u4ef6 + \u5386\u53f2\uff09\n   * `Chat.Read.All` \u6216 `ChatMessage.Read.All`\uff08\u7fa4\u804a\uff09\n2. \u4e3a\u79df\u6237**\u6388\u4e88\u7ba1\u7406\u5458\u540c\u610f**\u3002\n3. \u63d0\u5347 Teams \u5e94\u7528**\u6e05\u5355\u7248\u672c**\uff0c\u91cd\u65b0\u4e0a\u4f20\uff0c\u5e76**\u5728 Teams \u4e2d\u91cd\u65b0\u5b89\u88c5\u5e94\u7528**\u3002\n4. **\u5b8c\u5168\u9000\u51fa\u5e76\u91cd\u65b0\u542f\u52a8 Teams** \u4ee5\u6e05\u9664\u7f13\u5b58\u7684\u5e94\u7528\u5143\u6570\u636e\u3002\n\n## \u5df2\u77e5\u9650\u5236\n\n### Webhook \u8d85\u65f6\n\nTeams \u901a\u8fc7 HTTP webhook \u4f20\u9012\u6d88\u606f\u3002\u5982\u679c\u5904\u7406\u65f6\u95f4\u8fc7\u957f\uff08\u4f8b\u5982\uff0cLLM \u54cd\u5e94\u7f13\u6162\uff09\uff0c\u4f60\u53ef\u80fd\u4f1a\u770b\u5230\uff1a\n\n* Gateway \u7f51\u5173\u8d85\u65f6\n* Teams \u91cd\u8bd5\u6d88\u606f\uff08\u5bfc\u81f4\u91cd\u590d\uff09\n* \u4e22\u5931\u7684\u56de\u590d\n\nOpenClaw \u901a\u8fc7\u5feb\u901f\u8fd4\u56de\u5e76\u4e3b\u52a8\u53d1\u9001\u56de\u590d\u6765\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f46\u975e\u5e38\u6162\u7684\u54cd\u5e94\u4ecd\u53ef\u80fd\u5bfc\u81f4\u95ee\u9898\u3002\n\n### \u683c\u5f0f\u5316\n\nTeams markdown \u6bd4 Slack \u6216 Discord \u66f4\u6709\u9650\uff1a\n\n* \u57fa\u672c\u683c\u5f0f\u5316\u6709\u6548\uff1a**\u7c97\u4f53**\u3001*\u659c\u4f53*\u3001`\u4ee3\u7801`\u3001\u94fe\u63a5\n* \u590d\u6742\u7684 markdown\uff08\u8868\u683c\u3001\u5d4c\u5957\u5217\u8868\uff09\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6e32\u67d3\n* \u652f\u6301 Adaptive Cards \u7528\u4e8e\u6295\u7968\u548c\u4efb\u610f\u5361\u7247\u53d1\u9001\uff08\u89c1\u4e0b\u6587\uff09\n\n## \u914d\u7f6e\n\n\u5173\u952e\u8bbe\u7f6e\uff08\u5171\u4eab\u6e20\u9053\u6a21\u5f0f\u89c1 `\/gateway\/configuration`\uff09\uff1a\n\n* `channels.msteams.enabled`\uff1a\u542f\u7528\/\u7981\u7528\u6e20\u9053\u3002\n* `channels.msteams.appId`\u3001`channels.msteams.appPassword`\u3001`channels.msteams.tenantId`\uff1a\u673a\u5668\u4eba\u51ed\u8bc1\u3002\n* `channels.msteams.webhook.port`\uff08\u9ed8\u8ba4 `3978`\uff09\n* `channels.msteams.webhook.path`\uff08\u9ed8\u8ba4 `\/api\/messages`\uff09\n* `channels.msteams.dmPolicy`\uff1a`pairing | allowlist | open | disabled`\uff08\u9ed8\u8ba4\uff1apairing\uff09\n* `channels.msteams.allowFrom`\uff1a\u79c1\u4fe1\u5141\u8bb8\u5217\u8868\uff08AAD \u5bf9\u8c61 ID\u3001UPN \u6216\u663e\u793a\u540d\u79f0\uff09\u3002\u5f53 Graph \u8bbf\u95ee\u53ef\u7528\u65f6\uff0c\u5411\u5bfc\u5728\u8bbe\u7f6e\u671f\u95f4\u5c06\u540d\u79f0\u89e3\u6790\u4e3a ID\u3002\n* `channels.msteams.textChunkLimit`\uff1a\u51fa\u7ad9\u6587\u672c\u5206\u5757\u5927\u5c0f\u3002\n* `channels.msteams.chunkMode`\uff1a`length`\uff08\u9ed8\u8ba4\uff09\u6216 `newline` \u5728\u957f\u5ea6\u5206\u5757\u4e4b\u524d\u6309\u7a7a\u884c\uff08\u6bb5\u843d\u8fb9\u754c\uff09\u5206\u5272\u3002\n* `channels.msteams.mediaAllowHosts`\uff1a\u5165\u7ad9\u9644\u4ef6\u4e3b\u673a\u5141\u8bb8\u5217\u8868\uff08\u9ed8\u8ba4\u4e3a Microsoft\/Teams \u57df\u540d\uff09\u3002\n* `channels.msteams.mediaAuthAllowHosts`\uff1a\u5728\u5a92\u4f53\u91cd\u8bd5\u65f6\u9644\u52a0 Authorization \u5934\u7684\u5141\u8bb8\u5217\u8868\uff08\u9ed8\u8ba4\u4e3a Graph + Bot Framework \u4e3b\u673a\uff09\u3002\n* `channels.msteams.requireMention`\uff1a\u5728\u9891\u9053\/\u7fa4\u7ec4\u4e2d\u9700\u8981 @\u63d0\u53ca\uff08\u9ed8\u8ba4 true\uff09\u3002\n* `channels.msteams.replyStyle`\uff1a`thread | top-level`\uff08\u89c1[\u56de\u590d\u6837\u5f0f](#reply-style-threads-vs-posts)\uff09\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.replyStyle`\uff1a\u6bcf\u56e2\u961f\u8986\u76d6\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.requireMention`\uff1a\u6bcf\u56e2\u961f\u8986\u76d6\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.tools`\uff1a\u5f53\u7f3a\u5c11\u9891\u9053\u8986\u76d6\u65f6\u4f7f\u7528\u7684\u9ed8\u8ba4\u6bcf\u56e2\u961f\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08`allow`\/`deny`\/`alsoAllow`\uff09\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.toolsBySender`\uff1a\u9ed8\u8ba4\u6bcf\u56e2\u961f\u6bcf\u53d1\u9001\u8005\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08\u652f\u6301 `&quot;*&quot;` \u901a\u914d\u7b26\uff09\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.channels.&lt;conversationId&gt;.replyStyle`\uff1a\u6bcf\u9891\u9053\u8986\u76d6\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.channels.&lt;conversationId&gt;.requireMention`\uff1a\u6bcf\u9891\u9053\u8986\u76d6\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.channels.&lt;conversationId&gt;.tools`\uff1a\u6bcf\u9891\u9053\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08`allow`\/`deny`\/`alsoAllow`\uff09\u3002\n* `channels.msteams.teams.&lt;teamId&gt;.channels.&lt;conversationId&gt;.toolsBySender`\uff1a\u6bcf\u9891\u9053\u6bcf\u53d1\u9001\u8005\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08\u652f\u6301 `&quot;*&quot;` \u901a\u914d\u7b26\uff09\u3002\n* `channels.msteams.sharePointSiteId`\uff1a\u7528\u4e8e\u7fa4\u804a\/\u9891\u9053\u6587\u4ef6\u4e0a\u4f20\u7684 SharePoint \u7ad9\u70b9 ID\uff08\u89c1[\u5728\u7fa4\u804a\u4e2d\u53d1\u9001\u6587\u4ef6](#sending-files-in-group-chats)\uff09\u3002\n\n## \u8def\u7531\u548c\u4f1a\u8bdd\n\n* \u4f1a\u8bdd\u952e\u9075\u5faa\u6807\u51c6\u667a\u80fd\u4f53\u683c\u5f0f\uff08\u89c1 [\/concepts\/session](\/concepts\/session)\uff09\uff1a\n  * \u79c1\u4fe1\u5171\u4eab\u4e3b\u4f1a\u8bdd\uff08`agent:&lt;agentId&gt;:&lt;mainKey&gt;`\uff09\u3002\n  * \u9891\u9053\/\u7fa4\u7ec4\u6d88\u606f\u4f7f\u7528\u4f1a\u8bdd ID\uff1a\n    * `agent:&lt;agentId&gt;:msteams:channel:&lt;conversationId&gt;`\n    * `agent:&lt;agentId&gt;:msteams:group:&lt;conversationId&gt;`\n\n## \u56de\u590d\u6837\u5f0f\uff1a\u8bdd\u9898 vs \u5e16\u5b50\n\nTeams \u6700\u8fd1\u5728\u76f8\u540c\u7684\u5e95\u5c42\u6570\u636e\u6a21\u578b\u4e0a\u5f15\u5165\u4e86\u4e24\u79cd\u9891\u9053 UI \u6837\u5f0f\uff1a\n\n| \u6837\u5f0f                   | \u63cf\u8ff0              | \u63a8\u8350\u7684 `replyStyle` |\n| -------------------- | --------------- | ---------------- |\n| **Posts**\uff08\u7ecf\u5178\uff09        | \u6d88\u606f\u663e\u793a\u4e3a\u5361\u7247\uff0c\u4e0b\u65b9\u6709\u8bdd\u9898\u56de\u590d | `thread`\uff08\u9ed8\u8ba4\uff09     |\n| **Threads**\uff08\u7c7b Slack\uff09 | \u6d88\u606f\u7ebf\u6027\u6d41\u52a8\uff0c\u66f4\u50cf Slack | `top-level`      |\n\n**\u95ee\u9898\uff1a** Teams API \u4e0d\u66b4\u9732\u9891\u9053\u4f7f\u7528\u7684 UI \u6837\u5f0f\u3002\u5982\u679c\u4f60\u4f7f\u7528\u9519\u8bef\u7684 `replyStyle`\uff1a\n\n* \u5728 Threads \u6837\u5f0f\u9891\u9053\u4e2d\u4f7f\u7528 `thread` \u2192 \u56de\u590d\u5d4c\u5957\u663e\u793a\u5f88\u522b\u626d\n* \u5728 Posts \u6837\u5f0f\u9891\u9053\u4e2d\u4f7f\u7528 `top-level` \u2192 \u56de\u590d\u663e\u793a\u4e3a\u5355\u72ec\u7684\u9876\u7ea7\u5e16\u5b50\u800c\u4e0d\u662f\u5728\u8bdd\u9898\u4e2d\n\n**\u89e3\u51b3\u65b9\u6848\uff1a** \u6839\u636e\u9891\u9053\u7684\u8bbe\u7f6e\u65b9\u5f0f\u4e3a\u6bcf\u4e2a\u9891\u9053\u914d\u7f6e `replyStyle`\uff1a\n\n```json  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  &quot;msteams&quot;: {\n    &quot;replyStyle&quot;: &quot;thread&quot;,\n    &quot;teams&quot;: {\n      &quot;19:abc...@thread.tacv2&quot;: {\n        &quot;channels&quot;: {\n          &quot;19:xyz...@thread.tacv2&quot;: {\n            &quot;replyStyle&quot;: &quot;top-level&quot;\n          }\n        }\n      }\n    }\n  }\n}\n<\/code><\/pre>\n<h2>\u9644\u4ef6\u548c\u56fe\u7247<\/h2>\n<p><strong>\u5f53\u524d\u9650\u5236\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\u79c1\u4fe1\uff1a<\/strong> \u56fe\u7247\u548c\u6587\u4ef6\u9644\u4ef6\u901a\u8fc7 Teams bot file API \u5de5\u4f5c\u3002<\/li>\n<li><strong>\u9891\u9053\/\u7fa4\u7ec4\uff1a<\/strong> \u9644\u4ef6\u5b58\u50a8\u5728 M365 \u5b58\u50a8\uff08SharePoint\/OneDrive\uff09\u4e2d\u3002webhook \u8d1f\u8f7d\u4ec5\u5305\u542b HTML \u5b58\u6839\uff0c\u800c\u975e\u5b9e\u9645\u6587\u4ef6\u5b57\u8282\u3002<strong>\u9700\u8981 Graph API \u6743\u9650<\/strong>\u624d\u80fd\u4e0b\u8f7d\u9891\u9053\u9644\u4ef6\u3002<\/li>\n<\/ul>\n<p>\u6ca1\u6709 Graph \u6743\u9650\uff0c\u5e26\u56fe\u7247\u7684\u9891\u9053\u6d88\u606f\u5c06\u4f5c\u4e3a\u7eaf\u6587\u672c\u63a5\u6536\uff08\u673a\u5668\u4eba\u65e0\u6cd5\u8bbf\u95ee\u56fe\u7247\u5185\u5bb9\uff09\u3002<br \/>\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOpenClaw \u4ec5\u4ece Microsoft\/Teams \u4e3b\u673a\u540d\u4e0b\u8f7d\u5a92\u4f53\u3002\u4f7f\u7528 <code>channels.msteams.mediaAllowHosts<\/code> \u8986\u76d6\uff08\u4f7f\u7528 <code>[\"*\"]<\/code> \u5141\u8bb8\u4efb\u4f55\u4e3b\u673a\uff09\u3002<br \/>\nAuthorization \u5934\u4ec5\u9644\u52a0\u5230 <code>channels.msteams.mediaAuthAllowHosts<\/code> \u4e2d\u7684\u4e3b\u673a\uff08\u9ed8\u8ba4\u4e3a Graph + Bot Framework \u4e3b\u673a\uff09\u3002\u4fdd\u6301\u6b64\u5217\u8868\u4e25\u683c\uff08\u907f\u514d\u591a\u79df\u6237\u540e\u7f00\uff09\u3002<\/p>\n<h2>\u5728\u7fa4\u804a\u4e2d\u53d1\u9001\u6587\u4ef6<\/h2>\n<p>\u673a\u5668\u4eba\u53ef\u4ee5\u4f7f\u7528 FileConsentCard \u6d41\u7a0b\u5728\u79c1\u4fe1\u4e2d\u53d1\u9001\u6587\u4ef6\uff08\u5185\u7f6e\uff09\u3002\u4f46\u662f\uff0c<strong>\u5728\u7fa4\u804a\/\u9891\u9053\u4e2d\u53d1\u9001\u6587\u4ef6<\/strong>\u9700\u8981\u989d\u5916\u8bbe\u7f6e\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u4e0a\u4e0b\u6587<\/th>\n<th>\u6587\u4ef6\u53d1\u9001\u65b9\u5f0f<\/th>\n<th>\u6240\u9700\u8bbe\u7f6e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u79c1\u4fe1<\/strong><\/td>\n<td>FileConsentCard \u2192 \u7528\u6237\u63a5\u53d7 \u2192 \u673a\u5668\u4eba\u4e0a\u4f20<\/td>\n<td>\u5f00\u7bb1\u5373\u7528<\/td>\n<\/tr>\n<tr>\n<td><strong>\u7fa4\u804a\/\u9891\u9053<\/strong><\/td>\n<td>\u4e0a\u4f20\u5230 SharePoint \u2192 \u5171\u4eab\u94fe\u63a5<\/td>\n<td>\u9700\u8981 <code>sharePointSiteId<\/code> + Graph \u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td><strong>\u56fe\u7247\uff08\u4efb\u4f55\u4e0a\u4e0b\u6587\uff09<\/strong><\/td>\n<td>Base64 \u7f16\u7801\u5185\u8054<\/td>\n<td>\u5f00\u7bb1\u5373\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e3a\u4ec0\u4e48\u7fa4\u804a\u9700\u8981 SharePoint<\/h3>\n<p>\u673a\u5668\u4eba\u6ca1\u6709\u4e2a\u4eba OneDrive \u9a71\u52a8\u5668\uff08<code>\/me\/drive<\/code> Graph API \u7aef\u70b9\u5bf9\u5e94\u7528\u7a0b\u5e8f\u8eab\u4efd\u4e0d\u8d77\u4f5c\u7528\uff09\u3002\u8981\u5728\u7fa4\u804a\/\u9891\u9053\u4e2d\u53d1\u9001\u6587\u4ef6\uff0c\u673a\u5668\u4eba\u4e0a\u4f20\u5230 <strong>SharePoint \u7ad9\u70b9<\/strong>\u5e76\u521b\u5efa\u5171\u4eab\u94fe\u63a5\u3002<\/p>\n<h3>\u8bbe\u7f6e<\/h3>\n<ol>\n<li>\n<p><strong>\u5728 Entra ID\uff08Azure AD\uff09\u2192 App Registration \u4e2d\u6dfb\u52a0 Graph API \u6743\u9650<\/strong>\uff1a<br \/>\n   * <code>Sites.ReadWrite.All<\/code>\uff08Application\uff09- \u4e0a\u4f20\u6587\u4ef6\u5230 SharePoint<br \/>\n   * <code>Chat.Read.All<\/code>\uff08Application\uff09- \u53ef\u9009\uff0c\u542f\u7528\u6bcf\u7528\u6237\u5171\u4eab\u94fe\u63a5<\/p>\n<\/li>\n<li>\n<p>\u4e3a\u79df\u6237<strong>\u6388\u4e88\u7ba1\u7406\u5458\u540c\u610f<\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u83b7\u53d6\u4f60\u7684 SharePoint \u7ad9\u70b9 ID\uff1a<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n   # \u901a\u8fc7 Graph Explorer \u6216\u5e26\u6709\u6548\u4ee4\u724c\u7684 curl\uff1a<br \/>\n   curl -H &#8220;Authorization: Bearer $TOKEN&#8221;<br \/>\n     &#8220;https:\/\/graph.microsoft.com\/v1.0\/sites\/{hostname}:\/{site-path}&#8221;<\/p>\n<p># \u793a\u4f8b\uff1a\u5bf9\u4e8e &#8220;contoso.sharepoint.com\/sites\/BotFiles&#8221; \u7684\u7ad9\u70b9<br \/>\n   curl -H &#8220;Authorization: Bearer $TOKEN&#8221;<br \/>\n     &#8220;https:\/\/graph.microsoft.com\/v1.0\/sites\/contoso.sharepoint.com:\/sites\/BotFiles&#8221;<\/p>\n<p># \u54cd\u5e94\u5305\u542b\uff1a&#8221;id&#8221;: &#8220;contoso.sharepoint.com,guid1,guid2&#8221;<br \/>\n   &#8220;`<\/p>\n<ol start=\"4\">\n<li><strong>\u914d\u7f6e OpenClaw\uff1a<\/strong><br \/>\n   <code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n   {<br \/>\n     channels: {<br \/>\n       msteams: {<br \/>\n         \/\/ ... \u5176\u4ed6\u914d\u7f6e ...<br \/>\n         sharePointSiteId: \"contoso.sharepoint.com,guid1,guid2\",<br \/>\n       },<br \/>\n     },<br \/>\n   }<\/code><\/li>\n<\/ol>\n<h3>\u5171\u4eab\u884c\u4e3a<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u6743\u9650<\/th>\n<th>\u5171\u4eab\u884c\u4e3a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u4ec5 <code>Sites.ReadWrite.All<\/code><\/td>\n<td>\u7ec4\u7ec7\u8303\u56f4\u5171\u4eab\u94fe\u63a5\uff08\u7ec4\u7ec7\u4e2d\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8bbf\u95ee\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>Sites.ReadWrite.All<\/code> + <code>Chat.Read.All<\/code><\/td>\n<td>\u6bcf\u7528\u6237\u5171\u4eab\u94fe\u63a5\uff08\u4ec5\u804a\u5929\u6210\u5458\u53ef\u4ee5\u8bbf\u95ee\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bcf\u7528\u6237\u5171\u4eab\u66f4\u5b89\u5168\uff0c\u56e0\u4e3a\u53ea\u6709\u804a\u5929\u53c2\u4e0e\u8005\u624d\u80fd\u8bbf\u95ee\u6587\u4ef6\u3002\u5982\u679c\u7f3a\u5c11 <code>Chat.Read.All<\/code> \u6743\u9650\uff0c\u673a\u5668\u4eba\u56de\u9000\u5230\u7ec4\u7ec7\u8303\u56f4\u5171\u4eab\u3002<\/p>\n<h3>\u56de\u9000\u884c\u4e3a<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u573a\u666f<\/th>\n<th>\u7ed3\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u7fa4\u804a + \u6587\u4ef6 + \u5df2\u914d\u7f6e <code>sharePointSiteId<\/code><\/td>\n<td>\u4e0a\u4f20\u5230 SharePoint\uff0c\u53d1\u9001\u5171\u4eab\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u804a + \u6587\u4ef6 + \u65e0 <code>sharePointSiteId<\/code><\/td>\n<td>\u5c1d\u8bd5 OneDrive \u4e0a\u4f20\uff08\u53ef\u80fd\u5931\u8d25\uff09\uff0c\u4ec5\u53d1\u9001\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td>\u4e2a\u4eba\u804a\u5929 + \u6587\u4ef6<\/td>\n<td>FileConsentCard \u6d41\u7a0b\uff08\u65e0\u9700 SharePoint \u5373\u53ef\u5de5\u4f5c\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u4efb\u4f55\u4e0a\u4e0b\u6587 + \u56fe\u7247<\/td>\n<td>Base64 \u7f16\u7801\u5185\u8054\uff08\u65e0\u9700 SharePoint \u5373\u53ef\u5de5\u4f5c\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6587\u4ef6\u5b58\u50a8\u4f4d\u7f6e<\/h3>\n<p>\u4e0a\u4f20\u7684\u6587\u4ef6\u5b58\u50a8\u5728\u914d\u7f6e\u7684 SharePoint \u7ad9\u70b9\u9ed8\u8ba4\u6587\u6863\u5e93\u4e2d\u7684 <code>\/OpenClawShared\/<\/code> \u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<h2>\u6295\u7968\uff08Adaptive Cards\uff09<\/h2>\n<p>OpenClaw \u5c06 Teams \u6295\u7968\u4f5c\u4e3a Adaptive Cards \u53d1\u9001\uff08\u6ca1\u6709\u539f\u751f Teams \u6295\u7968 API\uff09\u3002<\/p>\n<ul>\n<li>CLI\uff1a<code>openclaw message poll --channel msteams --target conversation:&lt;id&gt; ...<\/code><\/li>\n<li>\u6295\u7968\u7531 Gateway \u7f51\u5173 \u7f51\u5173\u8bb0\u5f55\u5728 <code>~\/.openclaw\/msteams-polls.json<\/code> \u4e2d\u3002<\/li>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u5fc5\u987b\u4fdd\u6301\u5728\u7ebf\u624d\u80fd\u8bb0\u5f55\u6295\u7968\u3002<\/li>\n<li>\u6295\u7968\u5c1a\u4e0d\u81ea\u52a8\u53d1\u5e03\u7ed3\u679c\u6458\u8981\uff08\u5982\u9700\u8981\u8bf7\u68c0\u67e5\u5b58\u50a8\u6587\u4ef6\uff09\u3002<\/li>\n<\/ul>\n<h2>Adaptive Cards\uff08\u4efb\u610f\uff09<\/h2>\n<p>\u4f7f\u7528 <code>message<\/code> \u5de5\u5177\u6216 CLI \u5411 Teams \u7528\u6237\u6216\u4f1a\u8bdd\u53d1\u9001\u4efb\u610f Adaptive Card JSON\u3002<\/p>\n<p><code>card<\/code> \u53c2\u6570\u63a5\u53d7 Adaptive Card JSON \u5bf9\u8c61\u3002\u5f53\u63d0\u4f9b <code>card<\/code> \u65f6\uff0c\u6d88\u606f\u6587\u672c\u662f\u53ef\u9009\u7684\u3002<\/p>\n<p><strong>\u667a\u80fd\u4f53\u5de5\u5177\uff1a<\/strong><\/p>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;action&#8221;: &#8220;send&#8221;,<br \/>\n  &#8220;\u6e20\u9053&#8221;: &#8220;msteams&#8221;,<br \/>\n  &#8220;target&#8221;: &#8220;user:&#8221;,<br \/>\n  &#8220;card&#8221;: {<br \/>\n    &#8220;type&#8221;: &#8220;AdaptiveCard&#8221;,<br \/>\n    &#8220;version&#8221;: &#8220;1.5&#8221;,<br \/>\n    &#8220;body&#8221;: [{ &#8220;type&#8221;: &#8220;TextBlock&#8221;, &#8220;text&#8221;: &#8220;Hello!&#8221; }]<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n**CLI\uff1a**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw message send --channel msteams \n  --target &quot;conversation:19:abc...@thread.tacv2&quot; \n  --card '{&quot;type&quot;:&quot;AdaptiveCard&quot;,&quot;version&quot;:&quot;1.5&quot;,&quot;body&quot;:[{&quot;type&quot;:&quot;TextBlock&quot;,&quot;text&quot;:&quot;Hello!&quot;}]}'\n<\/code><\/pre>\n<p>\u53c2\u89c1 <a href=\"https:\/\/adaptivecards.io\/\">Adaptive Cards \u6587\u6863<\/a>\u4e86\u89e3\u5361\u7247\u6a21\u5f0f\u548c\u793a\u4f8b\u3002\u76ee\u6807\u683c\u5f0f\u8be6\u60c5\u89c1\u4e0b\u65b9<a href=\"#target-formats\">\u76ee\u6807\u683c\u5f0f<\/a>\u3002<\/p>\n<h2>\u76ee\u6807\u683c\u5f0f<\/h2>\n<p>MSTeams \u76ee\u6807\u4f7f\u7528\u524d\u7f00\u6765\u533a\u5206\u7528\u6237\u548c\u4f1a\u8bdd\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u76ee\u6807\u7c7b\u578b<\/th>\n<th>\u683c\u5f0f<\/th>\n<th>\u793a\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u7528\u6237\uff08\u6309 ID\uff09<\/td>\n<td><code>user:&lt;aad-object-id&gt;<\/code><\/td>\n<td><code>user:40a1a0ed-4ff2-4164-a219-55518990c197<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u7528\u6237\uff08\u6309\u540d\u79f0\uff09<\/td>\n<td><code>user:&lt;display-name&gt;<\/code><\/td>\n<td><code>user:John Smith<\/code>\uff08\u9700\u8981 Graph API\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u7ec4\/\u9891\u9053<\/td>\n<td><code>conversation:&lt;conversation-id&gt;<\/code><\/td>\n<td><code>conversation:19:abc123...@thread.tacv2<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u7ec4\/\u9891\u9053\uff08\u539f\u59cb\uff09<\/td>\n<td><code>&lt;conversation-id&gt;<\/code><\/td>\n<td><code>19:abc123...@thread.tacv2<\/code>\uff08\u5982\u679c\u5305\u542b <code>@thread<\/code>\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>CLI \u793a\u4f8b\uff1a<\/strong><\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<\/p>\n<h1>\u6309 ID \u53d1\u9001\u7ed9\u7528\u6237<\/h1>\n<p>openclaw message send &#8211;\u6e20\u9053 msteams &#8211;target &#8220;user:40a1a0ed-&#8230;&#8221; &#8211;message &#8220;Hello&#8221;<\/p>\n<h1>\u6309\u663e\u793a\u540d\u79f0\u53d1\u9001\u7ed9\u7528\u6237\uff08\u89e6\u53d1 Graph API \u67e5\u627e\uff09<\/h1>\n<p>openclaw message send &#8211;\u6e20\u9053 msteams &#8211;target &#8220;user:John Smith&#8221; &#8211;message &#8220;Hello&#8221;<\/p>\n<h1>\u53d1\u9001\u5230\u7fa4\u804a\u6216\u9891\u9053<\/h1>\n<p>openclaw message send &#8211;\u6e20\u9053 msteams &#8211;target &#8220;conversation:19:abc&#8230;@thread.tacv2&#8221; &#8211;message &#8220;Hello&#8221;<\/p>\n<h1>\u5411\u4f1a\u8bdd\u53d1\u9001 Adaptive Card<\/h1>\n<p>openclaw message send &#8211;\u6e20\u9053 msteams &#8211;target &#8220;conversation:19:abc&#8230;@thread.tacv2&#8221;<br \/>\n  &#8211;card &#8216;{&#8220;type&#8221;:&#8221;AdaptiveCard&#8221;,&#8221;version&#8221;:&#8221;1.5&#8243;,&#8221;body&#8221;:[{&#8220;type&#8221;:&#8221;TextBlock&#8221;,&#8221;text&#8221;:&#8221;Hello&#8221;}]}&#8217;<\/p>\n<pre><code>\n**\u667a\u80fd\u4f53\u5de5\u5177\u793a\u4f8b\uff1a**\n\n```json  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  &quot;action&quot;: &quot;send&quot;,\n  &quot;channel&quot;: &quot;msteams&quot;,\n  &quot;target&quot;: &quot;user:John Smith&quot;,\n  &quot;message&quot;: &quot;Hello!&quot;\n}\n<\/code><\/pre>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;action&#8221;: &#8220;send&#8221;,<br \/>\n  &#8220;\u6e20\u9053&#8221;: &#8220;msteams&#8221;,<br \/>\n  &#8220;target&#8221;: &#8220;conversation:19:abc&#8230;@thread.tacv2&#8221;,<br \/>\n  &#8220;card&#8221;: {<br \/>\n    &#8220;type&#8221;: &#8220;AdaptiveCard&#8221;,<br \/>\n    &#8220;version&#8221;: &#8220;1.5&#8221;,<br \/>\n    &#8220;body&#8221;: [{ &#8220;type&#8221;: &#8220;TextBlock&#8221;, &#8220;text&#8221;: &#8220;Hello&#8221; }]<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n\u6ce8\u610f\uff1a\u6ca1\u6709 `user:` \u524d\u7f00\u65f6\uff0c\u540d\u79f0\u9ed8\u8ba4\u89e3\u6790\u4e3a\u7fa4\u7ec4\/\u56e2\u961f\u3002\u6309\u663e\u793a\u540d\u79f0\u5b9a\u4f4d\u4eba\u5458\u65f6\u59cb\u7ec8\u4f7f\u7528 `user:`\u3002\n\n## \u4e3b\u52a8\u6d88\u606f\n\n* \u4e3b\u52a8\u6d88\u606f\u4ec5\u5728\u7528\u6237\u4ea4\u4e92**\u4e4b\u540e**\u624d\u53ef\u80fd\uff0c\u56e0\u4e3a\u6211\u4eec\u5728\u90a3\u65f6\u5b58\u50a8\u4f1a\u8bdd\u5f15\u7528\u3002\n* \u6709\u5173 `dmPolicy` \u548c\u5141\u8bb8\u5217\u8868\u63a7\u5236\uff0c\u8bf7\u53c2\u89c1 `\/gateway\/configuration`\u3002\n\n## \u56e2\u961f\u548c\u9891\u9053 ID\uff08\u5e38\u89c1\u9677\u9631\uff09\n\nTeams URL \u4e2d\u7684 `groupId` \u67e5\u8be2\u53c2\u6570**\u4e0d\u662f**\u7528\u4e8e\u914d\u7f6e\u7684\u56e2\u961f ID\u3002\u8bf7\u4ece URL \u8def\u5f84\u4e2d\u63d0\u53d6 ID\uff1a\n\n**\u56e2\u961f URL\uff1a**\n\n<\/code><\/pre>\n<p>https:\/\/teams.microsoft.com\/l\/team\/19%3ABk4j&#8230;%40thread.tacv2\/conversations?groupId=&#8230;<br \/>\n                                    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                                    \u56e2\u961f ID\uff08URL \u89e3\u7801\u6b64\u90e8\u5206\uff09<\/p>\n<pre><code>\n**\u9891\u9053 URL\uff1a**\n\n<\/code><\/pre>\n<p>https:\/\/teams.microsoft.com\/l\/\u6e20\u9053\/19%3A15bc&#8230;%40thread.tacv2\/ChannelName?groupId=&#8230;<br \/>\n                                      \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                                      \u9891\u9053 ID\uff08URL \u89e3\u7801\u6b64\u90e8\u5206\uff09<br \/>\n&#8220;`<\/p>\n<p><strong>\u7528\u4e8e\u914d\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>\u56e2\u961f ID = <code>\/team\/<\/code> \u540e\u7684\u8def\u5f84\u6bb5\uff08URL \u89e3\u7801\uff0c\u4f8b\u5982 <code>19:Bk4j...@thread.tacv2<\/code>\uff09<\/li>\n<li>\u9891\u9053 ID = <code>\/channel\/<\/code> \u540e\u7684\u8def\u5f84\u6bb5\uff08URL \u89e3\u7801\uff09<\/li>\n<li><strong>\u5ffd\u7565<\/strong> <code>groupId<\/code> \u67e5\u8be2\u53c2\u6570<\/li>\n<\/ul>\n<h2>\u79c1\u6709\u9891\u9053<\/h2>\n<p>\u673a\u5668\u4eba\u5728\u79c1\u6709\u9891\u9053\u4e2d\u7684\u652f\u6301\u6709\u9650\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u529f\u80fd<\/th>\n<th>\u6807\u51c6\u9891\u9053<\/th>\n<th>\u79c1\u6709\u9891\u9053<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u673a\u5668\u4eba\u5b89\u88c5<\/td>\n<td>\u662f<\/td>\n<td>\u6709\u9650<\/td>\n<\/tr>\n<tr>\n<td>\u5b9e\u65f6\u6d88\u606f\uff08webhook\uff09<\/td>\n<td>\u662f<\/td>\n<td>\u53ef\u80fd\u4e0d\u5de5\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>RSC \u6743\u9650<\/td>\n<td>\u662f<\/td>\n<td>\u884c\u4e3a\u53ef\u80fd\u4e0d\u540c<\/td>\n<\/tr>\n<tr>\n<td>@\u63d0\u53ca<\/td>\n<td>\u662f<\/td>\n<td>\u5982\u679c\u673a\u5668\u4eba\u53ef\u8bbf\u95ee<\/td>\n<\/tr>\n<tr>\n<td>Graph API \u5386\u53f2<\/td>\n<td>\u662f<\/td>\n<td>\u662f\uff08\u6709\u6743\u9650\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u5982\u679c\u79c1\u6709\u9891\u9053\u4e0d\u5de5\u4f5c\u7684\u53d8\u901a\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ol>\n<li>\u4f7f\u7528\u6807\u51c6\u9891\u9053\u8fdb\u884c\u673a\u5668\u4eba\u4ea4\u4e92<\/li>\n<li>\u4f7f\u7528\u79c1\u4fe1 &#8211; \u7528\u6237\u59cb\u7ec8\u53ef\u4ee5\u76f4\u63a5\u7ed9\u673a\u5668\u4eba\u53d1\u6d88\u606f<\/li>\n<li>\u4f7f\u7528 Graph API \u8fdb\u884c\u5386\u53f2\u8bbf\u95ee\uff08\u9700\u8981 <code>ChannelMessage.Read.All<\/code>\uff09<\/li>\n<\/ol>\n<h2>\u6545\u969c\u6392\u9664<\/h2>\n<h3>\u5e38\u89c1\u95ee\u9898<\/h3>\n<ul>\n<li><strong>\u9891\u9053\u4e2d\u56fe\u7247\u4e0d\u663e\u793a\uff1a<\/strong> \u7f3a\u5c11 Graph \u6743\u9650\u6216\u7ba1\u7406\u5458\u540c\u610f\u3002\u91cd\u65b0\u5b89\u88c5 Teams \u5e94\u7528\u5e76\u5b8c\u5168\u9000\u51fa\/\u91cd\u65b0\u6253\u5f00 Teams\u3002<\/li>\n<li><strong>\u9891\u9053\u4e2d\u65e0\u54cd\u5e94\uff1a<\/strong> \u9ed8\u8ba4\u9700\u8981\u63d0\u53ca\uff1b\u8bbe\u7f6e <code>channels.msteams.requireMention=false<\/code> \u6216\u6309\u56e2\u961f\/\u9891\u9053\u914d\u7f6e\u3002<\/li>\n<li><strong>\u7248\u672c\u4e0d\u5339\u914d\uff08Teams \u4ecd\u663e\u793a\u65e7\u6e05\u5355\uff09\uff1a<\/strong> \u79fb\u9664 + \u91cd\u65b0\u6dfb\u52a0\u5e94\u7528\u5e76\u5b8c\u5168\u9000\u51fa Teams \u4ee5\u5237\u65b0\u3002<\/li>\n<li><strong>\u6765\u81ea webhook \u7684 401 Unauthorized\uff1a<\/strong> \u5728\u6ca1\u6709 Azure JWT \u7684\u60c5\u51b5\u4e0b\u624b\u52a8\u6d4b\u8bd5\u65f6\u5c5e\u4e8e\u9884\u671f\u60c5\u51b5 &#8211; \u610f\u5473\u7740\u7aef\u70b9\u53ef\u8fbe\u4f46\u8ba4\u8bc1\u5931\u8d25\u3002\u4f7f\u7528 Azure Web Chat \u6b63\u786e\u6d4b\u8bd5\u3002<\/li>\n<\/ul>\n<h3>\u6e05\u5355\u4e0a\u4f20\u9519\u8bef<\/h3>\n<ul>\n<li><strong>&#8220;Icon file cannot be empty&#8221;\uff1a<\/strong> \u6e05\u5355\u5f15\u7528\u7684\u56fe\u6807\u6587\u4ef6\u4e3a 0 \u5b57\u8282\u3002\u521b\u5efa\u6709\u6548\u7684 PNG \u56fe\u6807\uff08<code>outline.png<\/code> \u4e3a 32&#215;32\uff0c<code>color.png<\/code> \u4e3a 192&#215;192\uff09\u3002<\/li>\n<li><strong>&#8220;webApplicationInfo.Id already in use&#8221;\uff1a<\/strong> \u5e94\u7528\u4ecd\u5b89\u88c5\u5728\u53e6\u4e00\u4e2a\u56e2\u961f\/\u804a\u5929\u4e2d\u3002\u5148\u627e\u5230\u5e76\u5378\u8f7d\u5b83\uff0c\u6216\u7b49\u5f85 5-10 \u5206\u949f\u8ba9\u5176\u4f20\u64ad\u3002<\/li>\n<li><strong>\u4e0a\u4f20\u65f6&#8221;Something went wrong&#8221;\uff1a<\/strong> \u6539\u4e3a\u901a\u8fc7 <a href=\"https:\/\/admin.teams.microsoft.com\">https:\/\/admin.teams.microsoft.com<\/a> \u4e0a\u4f20\uff0c\u6253\u5f00\u6d4f\u89c8\u5668 DevTools\uff08F12\uff09\u2192 Network \u9009\u9879\u5361\uff0c\u68c0\u67e5\u54cd\u5e94\u6b63\u6587\u4e2d\u7684\u5b9e\u9645\u9519\u8bef\u3002<\/li>\n<li><strong>\u4fa7\u8f7d\u5931\u8d25\uff1a<\/strong> \u5c1d\u8bd5&#8221;Upload an app to your org&#8217;s app catalog&#8221;\u800c\u4e0d\u662f&#8221;Upload a custom app&#8221; &#8211; \u8fd9\u901a\u5e38\u53ef\u4ee5\u7ed5\u8fc7\u4fa7\u8f7d\u9650\u5236\u3002<\/li>\n<\/ul>\n<h3>RSC \u6743\u9650\u4e0d\u5de5\u4f5c<\/h3>\n<ol>\n<li>\u9a8c\u8bc1 <code>webApplicationInfo.id<\/code> \u4e0e\u4f60\u7684\u673a\u5668\u4eba App ID \u5b8c\u5168\u5339\u914d<\/li>\n<li>\u91cd\u65b0\u4e0a\u4f20\u5e94\u7528\u5e76\u5728\u56e2\u961f\/\u804a\u5929\u4e2d\u91cd\u65b0\u5b89\u88c5<\/li>\n<li>\u68c0\u67e5\u4f60\u7684\u7ec4\u7ec7\u7ba1\u7406\u5458\u662f\u5426\u963b\u6b62\u4e86 RSC \u6743\u9650<\/li>\n<li>\u786e\u8ba4\u4f60\u4f7f\u7528\u7684\u662f\u6b63\u786e\u7684\u8303\u56f4\uff1a\u56e2\u961f\u4f7f\u7528 <code>ChannelMessage.Read.Group<\/code>\uff0c\u7fa4\u804a\u4f7f\u7528 <code>ChatMessage.Read.Chat<\/code><\/li>\n<\/ol>\n<h2>\u53c2\u8003\u8d44\u6599<\/h2>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/bot-service\/bot-service-quickstart-registration\">\u521b\u5efa Azure Bot<\/a> &#8211; Azure Bot \u8bbe\u7f6e\u6307\u5357<\/li>\n<li><a href=\"https:\/\/dev.teams.microsoft.com\/apps\">Teams \u5f00\u53d1\u8005\u95e8\u6237<\/a> &#8211; \u521b\u5efa\/\u7ba1\u7406 Teams \u5e94\u7528<\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/platform\/resources\/schema\/manifest-schema\">Teams \u5e94\u7528\u6e05\u5355\u6a21\u5f0f<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/platform\/bots\/how-to\/conversations\/\u6e20\u9053-messages-with-rsc\">\u4f7f\u7528 RSC \u63a5\u6536\u9891\u9053\u6d88\u606f<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/platform\/graph-api\/rsc\/resource-specific-consent\">RSC \u6743\u9650\u53c2\u8003<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/platform\/bots\/how-to\/bots-filesv4\">Teams \u673a\u5668\u4eba\u6587\u4ef6\u5904\u7406<\/a>\uff08\u9891\u9053\/\u7fa4\u7ec4\u9700\u8981 Graph\uff09<\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/platform\/bots\/how-to\/conversations\/send-proactive-messages\">\u4e3b\u52a8\u6d88\u606f<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Teams Microsoft Teams\uff08\u63d2\u4ef6\uff09 &#8220;\u8fdb\u5165\u6b64\u5730\u8005\uff0c\u653e\u5f03\u4e00\u5207\u5e0c\u671b [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":848,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/848"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}