microsoft-graph-api - 我在哪里可以获得 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。
解决方案
您可以查询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 ),登录并运行这些查询并查看结果。
推荐阅读
- ruby - 如何访问在我的 Ruby 程序中定义的数组形式的所有常量?
- python - 使用 Python3 处理 UTF-8 文件中的编码错误
- date - ag-grid 日期列 inRange 过滤器 - 如何访问测试函数中的“到”日期?
- r - 在 R 中生成数据而不是 for 循环的更好方法是什么?
- firebase - 尝试设置匿名 Firebase 登录选项时出现错误未定义类“AuthResult”
- include - 在使用 Clang-Format 时防止 CLion 重新排序包含
- c++ - 在c ++中重载运算符+以添加两个数组
- python - 使用 certutil 和 Python 下载文件
- servlets - 使用 HttpServletResponse 发送 .json 文件
- django - ValueError:字段 'id' 需要一个数字,但得到了 'asd'