在 智能 智能 Microsoft 365 Copilot 副驾驶® 副驾驶® 中启用代理或应用

如果已构建 Teams 应用或代理,并希望使其在 M365 Copilot 中可用,则可以使用自动处理清单更新的单个 CLI 命令来实现此目的。

使用 Teams Developer CLI

teams app update <appId> --scopes personal,team,copilot

此命令:

  • 添加到 copilot 机器人的范围列表 (并确保 personal 包含 - M365 Copilot) 所需
  • 自动将 copilotAgents.customEngineAgents 块添加到清单
  • 提升应用版本以便 Teams 识别此更改

然后重新安装应用。 最快的方法是从原始 teams app create 输出获取安装链接。 如果需要再次检索:

teams app get <appId> --install-link

在 Copilot 中测试

安装更新后的应用后:

  1. 在 Teams 中或在 m365.cloud.microsoft 打开 M365 Copilot
  2. 你的应用现在应可作为代理选项使用
  3. 通过 Copilot 界面与代理交互

手动清单编辑

如果未使用 Teams Developer CLI,可以手动更新清单。 将以下内容添加到:manifest.json

"bots": [
  {
    "botId": "<your-bot-id>",
    "scopes": ["personal", "team", "groupChat", "copilot"]
  }
],
"copilotAgents": {
  "customEngineAgents": [
    {
      "type": "bot",
      "id": "<your-bot-id>"
    }
  ]
}

编辑后,重新打包并上传清单:

teams app manifest upload <appId> ./manifest.json

或者手动压缩清单和图标 (manifest.json + color.png + outline.png) ,并在 Teams 中旁加载该 zip。

资源