Update MembersCanShare setting site

How to update the MembersCanShare setting of a SharePoint Online site collection (via the root Web) using a Power Automate flow.

URI

Headers

Body

Screenshot with example

Sample data
Site Address – https://contoso.sharepoint.com/sites/test
MembersCanShare – false

UpdateMembersCanSharesettingSite

Copy/paste example

Resources

SP.Web MembersCanShare property
Set site sharing settings

That’s it, Happy testing!

You may also like...

2 Responses

  1. Andy says:

    Regarding the documentation, _api/web is for Sites, not SiteCollections. For SiteCollections it should be _api/site

    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom#construct-rest-urls-to-access-sharepoint-resources

  2. Dennis says:

    Unfortunately, the Site class doesn’t have this property. So, it wouldn’t work on the ‘_api/site’ endpoint.

    Only the Web class has this property: https://learn.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.client.web.memberscanshare?view=sharepoint-csom

    That’s why I am using it on the (Root) Web of the Site Collection.
    https://stackoverflow.com/questions/2549530/spweb-webs-site-vs-subsite

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.