我一直在使用Graph的Beta API在团队中操作消息。在10/16,我开始执行这些操作时出现错误。我最终追踪到,在任何API调用中都会收到500条消息
GET /teams/{id}/channels/{id}/messages
同样的调用,省略了/messages
,正确地返回了频道信息。
例如
Invoke-RestMethod "https://graph.microsoft.us/beta/teams/$teamID/channels/$chanID/" -Method Get -Headers $head
返回通道实体对象,但
Invoke-RestMethod "https://graph.microsoft.us/beta/teams/$teamID/channels/$chanID/messages" -Method Get -Headers $head
返回以下错误(来自fiddler的完整数据)
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: application/json
request-id: 83ef77bb-5fa5-4277-939d-c192e7900c0e
client-request-id: 83ef77bb-5fa5-4277-939d-c192e7900c0e
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"USGov Iowa","Slice":"SliceC","Ring":"5","ScaleUnit":"001","RoleInstance":"AGSFE_IN_3"}}
Strict-Transport-Security: max-age=31536000
Date: Wed, 23 Oct 2019 18:33:43 GMT
Content-Length: 231
{
"error": {
"code": "InternalServerError",
"message": "Failed to execute request.",
"innerError": {
"request-id": "83ef77bb-5fa5-4277-939d-c192e7900c0e",
"date": "2019-10-23T18:33:43"
}
}
}
我做错了什么吗?
我在GCC高中的环境中。
谢谢,戴夫
发布于 2019-10-24 23:34:57
您是否正在使用应用程序权限?如果是这样的话,这个端点以及大多数其他消息端点(除了发送消息)都属于团队中受保护的API,因此您需要申请访问权限才能使用这些API。
https://stackoverflow.com/questions/58529198
复制