问题
GET https://microsoft.sharepoint.com/****/_api/Web/MembersCanShare
returns 'true'
200 OK
<?xml version="1.0" encoding="utf-8"?>
<d:MembersCanShare xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:type="Edm.Boolean">
true
</d:MembersCanShare>
then request to update to 'false'
POST https://microsoft.sharepoint.com/****/_api/Web/
X-HTTP-Method:MERGE
If-Match:*
Content-Type:application/json;odata=verbose
{
"MembersCanShare":false,
"__metadata":
{
"type":"SP.Web"
}
}
returns:
204 No Content
then
GET https://microsoft.sharepoint.com/****/_api/Web/MembersCanShare
still returns 'true'
200 OK
<?xml version="1.0" encoding="utf-8"?>
<d:MembersCanShare xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:type="Edm.Boolean">
true
</d:MembersCanShare>
...what am I doing wrong?
I've used this stack overflow question as a reference: Set Web properties of a site using SharePoint rest api
Thank you
来源:https://stackoverflow.com/questions/59054606/how-can-i-update-merge-web-memberscanshare-property-value-from-the-sharepoint-re