无法“列出频道消息";在Azure AD Graph API Beta上 [英] Unable to "List channel messages" on Azure AD Graph API Beta
问题描述
当我尝试列出频道消息时,我得到:
When I try to list channel messages I get:
[...] "code": "UnknownError", "message": "Failed to execute backend request." [...]
此错误适用于我不属于的所有团队.
This error is for all teams I don't belong to.
尝试从Microsoft Flow(使用HTTP GET)以及Graph Explorer调用API时出现此错误:我使用的帐户具有FULL权限,但仍要求检查我的权限:
I have this error when trying to call the API from Microsoft Flow (with HTTP GET) but also with Graph Explorer: the account I used has FULL permission but still asks to check my permission:
Failure - Status Code 403, 656ms Looks like you may not have the permissions for this call. Please modify your permissions
注册的应用程序具有调用此端点有关文档所需的委派权限:
And the registered application has the delegated permission needed to call this endpoint regarding the documentation:
GET /teams/{id}/channels/{id}/messages
https://docs.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta
是否由于测试版"或我错过的东西而导致了错误?
Is it a bug because of the "beta" or something I've missed?
推荐答案
在搜索和测试之后,我可以确认我错过了理解委派权限的工作原理.
After searching and testing I can confirm that I was miss understanding how the delegated permission works.
用户需要具有阅读聊天消息的权限,这意味着该用户至少需要是与电话相关的团队成员.
The user need to have the permission to read the chat message meaning that the user need to be at least a member of the team who is concerned by the call.
我通过在不属于该帐户的团队/小组中进行测试(结果= Satus代码403)并在将该帐户添加到团队/小组中后一切正常,
I confirmed it by testing on a teams/groups where the account is not member of (result = Satus code 403) and everything is working with success after adding the account in the teams/groups
这是否意味着目前要列出组织中所有团队的渠道消息,我们需要每个团队都有一个唯一的帐户成员(= Microsoft-graph呼叫中使用的帐户)?
如果有人遇到相同的情况,该视频有助于更轻松地理解该概念: https://www.youtube.com/watch?v=UPkHvy3eRCM
if anyone faced same situation this video helps to understand more easly the concept : https://www.youtube.com/watch?v=UPkHvy3eRCM
这篇关于无法“列出频道消息";在Azure AD Graph API Beta上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!