web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to disable commen...
Power Automate
Answered

Flow to disable commenting in modern page

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I have build a flow that generates modern sites. These sites are copied from a site template. But each copy has activated the comments function. Now I have found a instruction to disable the comment function via flow:

 

https://www.rbaconsulting.com/blog/tutorial-disable-commenting-on-a-modern-sharepoint-page-using-power-automate/

 

But if I use the URI

 

 

 

_api/web/lists/GetByTitle('Site Pages')/GetItemById(ItemID)/SetCommentsDisabled

 

 

 

I get an error, that the list "Site Pages" cannot be found. (Yes I have inserted an ItemID).

Then I used the URI what I use to check out a modern page via flow:

 

 

 

/_api/SitePages/pages(ItemID)/checkoutpage

 

 

 

and replaced /checkoutpage through /SetCommentsDisabled.

 

Then I get an error "The resource for the SetCommentsDisabled request was not found."

Can anyone help me building this flow?

 

01.jpg

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @chhe_,

     

    I just tested it on my demo environment and the first POST request worked, see the screenshot below.

     

    However, my language settings are en-gb. I see you are using a different language in your screenshot. Is there any chance the display name of your site pages library is different?

     

    sitepages_disablecomments.png

     

    Alternatively, you could also retrieve the Site Pages library by GUID like below (change the GUID by your GUID).

    _api/web/lists('ce5c4dfb-258d-4e17-9f1a-4fcca3c38ff0')/GetItemById(2)/SetCommentsDisabled

     

  • chhe_ Profile Picture
    5 on at

    Hi,

    Thank you. With the GUID it worked.

  • bdufort Profile Picture
    16 on at

    Nevermind!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard