Change “Access Request Settings” via REST in SharePoint

  jQuery.ajax({
    url: “https://<yoursite>/sites/<yourSite>/ABCteamSite/_api/web”,
    type: “POST”,
    data: JSON.stringify({‘__metadata’:  {‘type’: ‘SP.Web’ },’Description’: ‘ABCteamSite’,’RequestAccessEmail’: ‘<youraddress>@gmail.com’}),
    headers: {
        “accept”: “application/json; odata=verbose”,
        “content-type”:”application/json;odata=verbose”,
        “X-RequestDigest”: jQuery(“#__REQUESTDIGEST”).val(),
        “X-HTTP-Method”: “MERGE”
    }
   }).done(function (data) {
    console.log(“Done”);
 
}).fail(function (error) {
   console.log(“failed”);
   });

Leave a Reply

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