使用图形 API 方法不允许存档 Tams (405)

huangapple go评论57阅读模式
英文:

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

响应结束

API 权限:
使用图形 API 方法不允许存档 Tams (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.

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

Api permissions:
使用图形 API 方法不允许存档 Tams (405)

答案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

huangapple
  • 本文由 发表于 2023年7月13日 16:46:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76677502.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定