英文:
Archive Tams using Graph Api MethodNotAllowed (405)
问题
I create an Azure Active Directory (AAD) group, and then based on that group, a Teams team is created, all using the Graph API, and it works fine.
但是当我尝试调用方法来归档该 Teams 团队时,我收到了一个错误消息。
REST_Archive_Teams - 请求 URL:
https://graph.microsoft.com/v1.0/teams/645428b1-a6df-47************/archive
响应代码:
MethodNotAllowed (405)
日志
请求开始
请求 URL:
https://graph.microsoft.com/v1.0/teams/645428b1-a6df-************/archive
请求头:
Authorization: Bearer *****
请求体:
请求结束
响应开始
响应代码:
MethodNotAllowed (405)
响应体:{"error":{"code":"UnknownError","message":"","innerError":{"date":"2023-07-13T07:50:45","request-id":"02de4a20-4690-4ba3-8882-a0740a8a3de1","client-request-id":"02de4a20-4690-4ba3-8882-a0740a8a3de1"}}}
响应头:Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000
request-id: 02de4a20-4690-4ba3-8882-a0740a8a3de1
client-request-id: 02de4a20-4690-4ba3-8882-a0740a8a3de1 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF00024186"}}
日期:Thu, 13 Jul 2023 07:50:44 GMT
响应结束
英文:
I create an Azure Active Directory (AAD) group, and then based on that group, a Teams team is created, all using the Graph API, and it works fine.
But when I try to call the method to archive that Teams team, I receive an error message back.
REST_Archive_Teams - Request Url:
https://graph.microsoft.com/v1.0/teams/645428b1-a6df-47************/archive
Response Code:
MethodNotAllowed (405)
Log
Request Start
Request-Url:
https://graph.microsoft.com/v1.0/teams/645428b1-a6df-************/archive
Request-Header:
Authorization: Bearer *****
Request-Body:
Request End
Response Start
Response-Code:
MethodNotAllowed (405)
Response-Body: {"error":{"code":"UnknownError","message":"","innerError":{"date":"2023-07-13T07:50:45","request-id":"02de4a20-4690-4ba3-8882-a0740a8a3de1","client-request-id":"02de4a20-4690-4ba3-8882-a0740a8a3de1"}}}
Response-Header: Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000
request-id: 02de4a20-4690-4ba3-8882-a0740a8a3de1
client-request-id: 02de4a20-4690-4ba3-8882-a0740a8a3de1 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF00024186"}}
Date: Thu, 13 Jul 2023 07:50:44 GMT
Response End
答案1
得分: 1
错误 MethodNotAllowed (405)
发生在您使用不正确的HTTP方法时,例如使用GET而不是POST。存档团队需要使用POST。
POST https://graph.microsoft.com/v1.0/teams/645428b1-a6df-47************/archive
英文:
The error MethodNotAllowed (405)
happens when you use incorrect HTTP method like GET instead of POST. Archive team requires POST.
POST https://graph.microsoft.com/v1.0/teams/645428b1-a6df-47************/archive
答案2
得分: 0
HTTP状态码405方法不允许- 响应状态码表示服务器知道请求方法,但目标资源不支持此HTTP动词。
此API方法是一个POST方法,
POST /teams/{id}/archive
https://learn.microsoft.com/en-us/graph/api/team-archive?view=graph-rest-1.0&tabs=http#http-request
英文:
HTTP status code 405 Method Not Allowed- response status code indicates that the server knows the request method, but the target resource doesn't support this HTTP verb.
This API method is a POST method,
POST /teams/{id}/archive
https://learn.microsoft.com/en-us/graph/api/team-archive?view=graph-rest-1.0&tabs=http#http-request
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论