Deleting chat history for a user with Graph API

Kaif Master 30 Reputation points
2024-02-06T07:22:16.8466667+00:00

Hello, Is it possible to delete chat history for a user through Graph API? I want to achieve the same functionality as Teams, where deleting the chat also removes the user from the group. Thank you.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Adharsh Santhanam 6,015 Reputation points Volunteer Moderator
    2024-02-06T09:23:50.1+00:00

    Hello @Kaif Master Yes, it's possible to delete chat history for a user using Graph API which you can use to delete chats and chat messages. To delete a chat, you can use the DELETE method with the chat ID as a parameter. You can see the details here - https://learn.microsoft.com/en-us/graph/api/chat-delete?view=graph-rest-beta&tabs=http To delete a chat message, you can use the softDelete method with the chat message ID as the parameter. You can see the details here - https://learn.microsoft.com/en-us/graph/api/chatmessage-softdelete?view=graph-rest-1.0&tabs=http Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.