0

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: enter image description here

2 Answers 2

1

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
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, yes i made a basic mistake. I did not change the method to POST, only the Get method from another responce remained. Time for some free time, I guess.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.