Restrict Members From Deleting Chat Messages In Team

Microsoft Team is a communication product/service from Microsoft 365. This helps the user to connect and communicate between the users within the organization or external Organization. There are two sets of user types within an Organization for a Team. Those are Owners and Members.

By default, Team members can delete their own chat messages posted in Team Chat. In this post, I would like to show you how to restrict the members from removing or deleting their own messages after they have posted to the Team Chat for the particular Microsoft Team.

Teams UI

Follow the below Steps in Microsoft Team to block the Chat messages deletion option for the Member,

  • Open Microsoft Team
  • If you are the owner of the Microsoft Team, Click the More Options (...) button for the particular Team
  • Click the Settings Tab
  • Expand the Member Permissions
  • Uncheck the option "Give members the option to delete their messages". Settings get automatically saved.

Microsoft Graph API

We can also use the Microsoft Graph API to do the same action. Use the below options in Microsoft Graph Explorer to block the same option.

Microsoft Graph API EndPoint

PATCH<team id>

Consent Permission

Delegated Permission: TeamSettings.ReadWrite.All, Group.ReadWrite.All**, Directory.ReadWrite.All**

The below request headers should be sent along with the request to update the settings,

Request Header

Content-Type: application/json

Request Body

    "messagingSettings": {
        "allowUserDeleteMessages": false

In Microsoft Graph Explorer, click Run Query to send the request and update the settings for the Team.


Now Team Members won't be able to delete their messages once they are posted to the Microsoft Team Chat for a particular Team. The below response will be returned after submitting the request.


Similar Articles