How to update ShqrePoint Group name?

SharePoint Asked by Kaddrik on November 26, 2020

hope everything is fine.

I managed to created / delete SharePoint groups but also add and remove users using HTTP requests.

The problem i’m facing now is … how can I update the name of a group ??

I did something which is a mix between the group creation and the addition of user but that throws an error "__metadata does not exist in method GetById"

the problem is i can only reference my group from the ID since the name of the group has changed….

Would someone please be able to help me …?

Thanks a lot in advance

enter image description here

2 Answers

You could try to use js to test the request,after the test is successful,you fill in the value one by one.

This code works well:

<script src=""></script>

var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyId(23)";
url: requestUri,
type: "POST",
data:JSON.stringify({'__metadata': { 'type': 'SP.Group' }, 'Title':'testing'}),
headers: {
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: onSuccess,
error: onError
function onSuccess(data) {
alert('Group description updated successfully');
function onError(error) {
<input type="button" id="btnClick" value="Update SharePoint Group Details"/>

Then you could find you need to add "X-HTTP-Method":"MERGE" in header.

Correct answer by Amos_MSFT on November 26, 2020

#Config Variables $SiteURL = "" $GroupName= "Sales Portal Members" $NewGroupName ="Sales Managers"

#Connect PNP Online Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)

#Update the Group Name Set-PnPGroup -Identity $GroupName -Title $NewGroupName

Answered by MD ASADUZZAMAN on November 26, 2020

Add your own answers!

Related Questions

SSL for sharepoint wildcard with SANS

1  Asked on October 25, 2021 by ruby-trustit


MOSS – Event ID 5785 repeats every 5 min in the Event Viewer

1  Asked on October 25, 2021 by savantprodigy


Field not found exception

2  Asked on October 25, 2021 by denis-bednov


Mapping drive connection problem

1  Asked on October 25, 2021 by ahmed-aborady


How to create an email reminder in Sharepoint 2013

2  Asked on October 25, 2021 by cristian-badea


Microsoft Graph/Sharepoint API search

1  Asked on October 25, 2021 by elb98rm


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP