How to Enable or Disable Comments in SharePoint Online List?

The “Comment” feature introduced in SharePoint Online modern lists allows users to comment on SharePoint Online list items. Commenting is a great way to collect feedback and keep track of changes on essential documents. This article will show you how to enable or disable comments in your SharePoint list.

sharepoint online disable comments on list items

Disable Comments in SharePoint Online List Items

Although comments in SharePoint Online list items are a great new feature, you may want to hide it in some scenarios! E.g., It may confuse end-users of lists that already have a comments field. No one can add or view comments on list items if you disable comments. This article will show you how to enable or disable comments in a SharePoint Online list.

How to disable list comments at the tenant level using PowerShell?

To disable list item comments globally at the tenant level, Login as a SharePoint Admin/Global Admin and use the Set-SPOTenant PowerShell cmdlet with CommentsOnListItemsDisabled parameter. This can come in handy if you want to remove the ability for users to add comments to lists in your SharePoint Online environment:

#Connect to SharePoint Online
Connect-SPOService -Url https://crescent-admin.sharepoint.com

#Disable comments on list items
Set-SPOTenant -CommentsOnListItemsDisabled $True

This PowerShell disables comments on all lists tenant-wide (not for specific sites). To enable the comments back, use:

#Enable comments on list items
Set-SPOTenant -CommentsOnListItemsDisabled $False
If you get “Set-SPOTenant : A parameter cannot be found that matches parameter name ‘CommentsOnListItemsDisabled’.” error, You have to update your PowerShell module for SharePoint Online! More info here: How to update SharePoint Online PowerShell Module?

SharePoint Online: Disable comments at list level

To disable comments in the SharePoint Online list, do the following:

  • Go to your SharePoint list >> Click on the settings gear icon >> Select List settings
  • on the List Settings page, click on “Advanced”
  • Under the “Comments” section, set the “Allow comments on list items?” to Yes or “No” according to your requirement. This setting determines whether users can add comments to items in the list.
    enable-disable comments in sharepoint online list
  • Click on OK to save the changes.

This setting turns off comments in the SharePoint Online list. The same thing can be achieved with PowerShell as well:

#Set Variables
$SiteURL = "https://crescent.sharepoint.com"
$ListName = "Tasks"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive
$List = Get-PnPList $ListName

#Disable Comments
$List.DisableCommenting = $true
$List.Update()
Invoke-PnPQuery

This setting determines whether contributors can add comments to items in the list.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “How to Enable or Disable Comments in SharePoint Online List?

  • The Allow Comments toggle doesn’t work. Comments show regardless

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *