How to Collect Comments from All SharePoint Site Pages
Question details
Administrators need a way to consolidate and record all comments from across various SharePoint site pages, including authors and page locations.
- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Tracking user feedback and mentions across an entire SharePoint site to ensure no comments are missed.
- Observed behavior
- SharePoint lacks a built-in feature to view a consolidated log of all comments across multiple site pages, requiring manual checking.
Ensure you have the necessary administrative permissions for the SharePoint site and have the PnP PowerShell module installed on your system.
Use PnP PowerShell and SharePoint REST API
Create a PowerShell script to iterate through the Site Pages library and fetch comments using the REST API.
Since SharePoint does not offer a native centralized comment dashboard, administrators can leverage PnP PowerShell. By enumerating the Site Pages library, you can programmatically call the Comments endpoint for each page ID.
Connect to your SharePoint site using the Connect-PnPOnline command in PowerShell.
Enumerate all items in the 'Site Pages' library to get their specific page IDs.
Iterate through each page and call the REST API endpoint: /_api/web/lists/GetByTitle('Site Pages')/GetItemById(pageId)/Comments.
Extract the comment authors, text, and metadata from the JSON response and export the consolidated data to a CSV file or trigger a notification.
Looking for a Lightweight Document Collaboration Solution?
While managing complex SharePoint scripts can be daunting, everyday document collaboration shouldn't be. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office. Enjoy seamless formatting, familiar interfaces, and robust built-in commenting tools without the heavy overhead.
- 1. Download WPS Office: Visit the official WPS website to download and install WPS Office Free on your device.
- 2. Open Your Documents: Easily open your existing Microsoft Office files without worrying about formatting issues.
- 3. Collaborate and Comment: Use the Review tab to easily add, reply to, and manage comments directly within your documents.

Frequently Asked Questions
Is there a built-in web part to view all SharePoint comments at once?
No, SharePoint currently does not offer an out-of-the-box web part or consolidated dashboard to view all comments across multiple site pages.
What permissions are needed to query comments via the SharePoint REST API?
You need at least Read access to the Site Pages library to retrieve the pages and their associated comments using the REST API.
Where can I get help writing the PnP PowerShell script for SharePoint?
The Microsoft Q&A forum is the official and recommended platform for detailed scripting assistance and troubleshooting related to SharePoint REST API.




