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

Community site session details

Session Id :
Power Automate - Building Flows
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

I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    32,932 Most Valuable Professional on at
    Re: Flow to disable commenting in modern page

    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
    Re: Flow to disable commenting in modern page

    Hi,

    Thank you. With the GUID it worked.

  • bdufort Profile Picture
    16 on at
    Re: Flow to disable commenting in modern page

    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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 535 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 348 Moderator

#3
developerAJ Profile Picture

developerAJ 262

Last 30 days Overall leaderboard