1

I am looking for JSOM or REST option to update SharePoint user group settings who can edit the membership for the group.

2

Exactly which settings do you want to update?

Microsoft provided detailed documentation on Users, groups, and roles using REST API in below article:

Users, groups, and roles REST API reference.

1

The following code for your reference.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
function changeGroup(){
    var groupName="LZ Members";
    var allowMembersEditMembership=true;
    $.ajax({
        url: _spPageContextInfo.siteAbsoluteUrl+"/_api/web/sitegroups/getByName('"+groupName+"')",
        type: "POST",
        data: JSON.stringify({ '__metadata': { 'type': 'SP.Group' }, 'AllowMembersEditMembership': allowMembersEditMembership }),
        headers: {
            "Accept": "application/json;odata=verbose",
            "content-type":"application/json; odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "X-HTTP-Method": "MERGE",
            "If-Match": "*"
        },
        success: function(){
            console.log("success");
        },
        error: function(err){
            console.log(JSON.stringify(err));
        }
    });
}
</script>
<input type="button" value="ChangeGroup" onclick="changeGroup()"/>

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.