Prevent a User from Deleting Private Chats in Microsoft Teams?
To prevent a user from deleting private chats in Microsoft Teams, check the messaging policy
as mentioned at
Prevent a user from Permanently deleting private chats in Microsoft Teams?
To prevent a user from permanently deleting private chats in Microsoft Teams, the solution is Place a Microsoft Teams user or team on legal hold
The private channel chats are stored in user mailboxes, and normal channel chats are stored in a Team's group mailbox. so we can add the mailbox in-hold, this will allow the guest user to delete the chat but only soft-delete and this will not allow him to delete it permanently.
To put a user or a team on legal hold:
- Navigate to the Security & Compliance Center. When you create a new case, you are presented with the option to place mailboxes or sites on hold.
Go to eDiscovery or Advanced eDiscovery and create a case by clicking "Create a Case". Once the case is created, open it.
Go to the "Holds" section from the top menu and click "+ Create" to create a hold. Putting a user or a team on hold saves all the messages exchanged by those users or messages. When you create a new case, you are presented with the option to place mailboxes or sites on hold.
Name your hold. Select a descriptive and unique name for the hold you are going to create.
Choose location. Choose whether you want the hold to be applied on a user or on an entire Team (hold cannot be applied on individual channels for now). Note: if a user is on hold, all their messages would be on hold, including whatever they sent in a 1:1 chat, 1:many or group chat, or a channel conversation (including private channels).
- Create Query. You can customize the hold if you want more granularity in the hold policy. For example, you can specify keywords to look for, or you can add more conditions, that would need to be satisfied for the hold to take effect.
- Review your settings before publishing it to your organization.
Reference: