Delete chat
Namespace: microsoft.graph
Soft-delete a chat. When invoked with delegated permissions, this operation only works for tenant admins and Teams service admins.
Notes: This operation is not supported for non-admin users. Only tenant admins for the user who initiated the chat can delete the chat. For example, if a user from tenant A creates a thread and then adds a user from tenant B, only the admin from tenant A can delete the thread. This API deletes 1:1 chats, meeting chats, and group chat threads. It does not delete channel chat threads. After chats are deleted, tenant admins have seven days to restore them. Chats deleted for more than seven days can't be restored. One delete request per second per tenant is allowed.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Chat.ManageDeletion.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Chat.ManageDeletion.All | Not available. |
HTTP request
DELETE /chats/{chat-id}
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this action returns a 204 No Content
response code.
Examples
Request
DELETE https://graph.microsoft.com/v1.0/chats/19:7d898072-792c-4006-bb10-5ca9f2590649_8ea0e38b-efb3-4757-924a-5f94061cf8c2@unq.gbl.spaces
Response
HTTP/1.1 204 No Content
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기