我一直在使用 Graph 的 Beta API 来处理 Teams 中的消息。在 10 月 16 日,我开始在执行这些操作时遇到错误。我终于追查到在任何 API 调用上都收到 500 条消息
获取 /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
返回以下错误(来自提琴手的完整数据)
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 高环境中。
谢谢戴夫