团队列表频道 Graph API 已开始抛出未经授权的错误,如下所示。直到昨天它都可以正常工作。我们使用“ServicePrincipal”进行身份验证,它具有所有必要的图形权限。在这种情况下 - Group.Read.All
我们使用的示例端点如下。 https://graph.microsoft.com/v1.0/teams/dccde580-0fc5-11eb-adc1-0242ac120002/channels。
从今天早上开始,它不断失败并出现以下错误。更重要的是,这不是测试版 API。
根据我们的分析,对于那些拥有私人频道的团队来说,这是失败的。但是根据文档,私有频道也应该在响应中返回。我不明白可能是什么问题。
在这方面的任何想法/提示/帮助都非常感谢。
{
"error": {
"code": "Unauthorized",
"message": "Failed to execute Aad backend request GetUsersByObjectIdsRequest. Workload Unknown. Request Url: https://graph.windows.net/myorganization/getObjectsByObjectIds?api-version=1.61-internal, Request Method: POST, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: 0yK5pQbb6mmQTig21hH07WmGI0k2nuTime8Zw4wMO7k=\r\nrequest-id: c33c655e-27f7-4f96-aabf-70e6d9d8770d\r\nclient-request-id: 5bd775a7-7dba-4ad7-bc9a-fbd91ae46fea\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Fri, 16 Oct 2020 15:23:45 GMT\r\n, Reason Phrase: Unauthorized",
"innerError": {
"date": "2020-10-16T15:23:45",
"request-id": "3f3793b8-02d6-4653-a14f-3e455660e3d8",
"client-request-id": "3f3793b8-02d6-4653-a14f-3e455660e3d8"
}
}
}
Run Code Online (Sandbox Code Playgroud) 我正在使用 POSTMAN 调用 Microsoft Graph API。我正在尝试订阅多个用户的状态。文档中提到,为了订阅对多个用户状态的更改,请使用以下 url:/communications/presences?$filter=id in ({id},{id}...)
请求网址
https://graph.microsoft.com/beta/subscriptions
Run Code Online (Sandbox Code Playgroud)
这是请求正文(原始)
{
"changeType": "updated",
"notificationUrl": "https://d3a8ebc3581d.ngrok.io/presence-notify/",
"resource": "/communications/presences?$filter=id in (abcd-efgh-4856-a935-c9a2f685xyz,abcd-efgh-47f8-9d79-eacb0fd6xyz)",
"expirationDateTime": "2020-09-22T07:37:13Z",
"clientState": "secretClientState"
}
Run Code Online (Sandbox Code Playgroud)
我代表用户调用此 API,即我正在使用UserAccessToken
. 这是回应:
{
"error": {
"code": "BadRequest",
"message": "Invalid filter clause",
"innerError": {
"date": "2020-09-21T16:24:50",
"request-id": "2cf476f0-2270-417f-a987-5c5bbc92a351",
"client-request-id": "2cf476f0-2270-417f-a987-5c5bbc92a351"
}
}
}
Run Code Online (Sandbox Code Playgroud)
PS:我已经更改了两个用户 ID 的前几个和最后几个字符。所以这不是问题。