首页 > 解决方案 > 我在哪里可以获得 groupId?

问题描述

我有一个 MS TEAMS 的消息扩展应用程序。我将使用https://graph.microsoft.com/v1.0/groups/{group-id-for-teams}/members来获取“成员”。我在哪里可以得到 group-id-for-teams?ChannelAccount 数据看起来像

"conversationAccount": {
  "isGroup": true,
  "conversationType": "channel",
  "id": "34:v7g123e0ee5a4502943cfcf24f12123c@thread.skype",
  "name": null,
  "aadObjectId": null,
  "role": null,
  "tenantId": "11111111-1111-1111-1111-111111111111"

有一些 ID,但不是 group-id-for-teams。

标签: microsoft-graph-apimicrosoft-teamsmicrosoft-graph-teams

解决方案


您可以查询https://graph.microsoft.com/v1.0/groups以获取所有组。您可以搜索您的组并获取 ID。

对于团队,您可以查询https://graph.microsoft.com/v1.0/me/joinedTeams以获取您所属的所有团队。我猜所有团队都没有api。

您可以立即转到 Graph explorer ( https://developer.microsoft.com/en-us/graph/graph-explorer ),登录并运行这些查询并查看结果。


推荐阅读