I want to insert group into list column .how to add share point group into people or group list column using JavaScript or Rest API .


Let's do the REST-approach:

First: Query the group, you want to add:

I assume, that you have an existing list item, which you want to update with the Group-Id, which you can extract from the previous query:

  • URL: https://yoursite/_api/web/lists/getbytitle('myList')/items(listItemId)
  • HEADERS: accept: application/json, content-type: application/json;odata=verbose, IF-MATCH: *, X-Http-Method: MERGE, X-RequestDigest: theRequestDigestValue

  • Data: {"__metadata":{"type":"SP.Data.MyListListItem"},"PersonFieldInternalNameId":groupId}

Please replace yoursite, myList, listItemId, theRequestDigestValue and groupId through the appropriate values.

If you want to update a multiple person field, you have to replace groupId in the last query through {"results":[groupId1,groupId2]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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