---
schema_version: "1"
id: 1b4dc4db13086a88caa058b2484089193368e3e71beb74c0e7917389661fa61f
title: "Examples: Manage Group Members with SCIM"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/identity_scim_manage_groups.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.identity_scim_manage_groups.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1c2206170033ea71a632c2fb800a22094b80e7ecafddc6f4cfa74532cd4050d8
description: You can use SCIM to manage a group by adding or removing members.
products:
  - Security
  - Cross Cloud
release: "264"
---
# Examples: Manage Group Members with SCIM

You can use SCIM to manage a group by adding or removing members.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All</strong> Editions</td></tr></tbody></table>

Here are examples for managing group members with SCIM.

- [Add a User to a Group](https://help.salesforce.com/s/articleView?id=xcloud.identity_scim_manage_groups.htm&release=264.0.0&type=5)
- [Remove a User from a Group](https://help.salesforce.com/s/articleView?id=xcloud.identity_scim_manage_groups.htm&release=264.0.0&type=5)

## Add a User to a Group

To add a user to a group, send a PATCH request to the Groups endpoint. Remember to query the Groups endpoint to see a list of available roles.

Request:

```
PATCH https://mycompany.my.salesforce.com/services/scim/v2/Groups/<group_id>

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "add",
      "path": "members",
      "value": {
        "members": [
          {
            "value": "<user_id>"
          }
        ]
      }
    }
  ]
}
```

Response:

```
HTTP/1.1 200 OK
…

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ],
  "id": "00G4W000006IKBnUAO",
  "displayName": "mycompany-West",
  "type": "Regular",
  "members": [
    {
      "value": "0054W00000CVREkQAP",
      "type": "User",
      "$ref": "https://mycompany.my.salesforce.com/services/scim/v2/Users/0054W00..."
    }
  ],
  "meta": {
    "created": "2020-10-25T09:27:40Z",
    "lastModified": "2020-10-25T09:27:40Z",
    "location": "https://mycompany.my.salesforce.com/services/scim/v2/Groups/00G4W000006IKBnUAO",
    "resourceType": "Group",
    "version": "2aa9ea6605cb4c31403cdfd1b020cde5dd255300"
  }
}
```

## Remove a User from a Group

To remove a user from a group, send a PATCH request to the Groups endpoint.

Request:

```
PATCH https://mycompany.my.salesforce.com/services/scim/v2/Groups/<group_id>

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "remove",
      "path": "members",
      "value": {
        "members": [
          {
            "value": "<user_id>"
          }
        ]
      }
    }
  ]
}
```

Response:

```
HTTP/1.1 200 OK
…

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ],
  "id": "00G4W000006IKBnUAO",
  "displayName": "mycompany-West",
  "type": "Regular",
  "members": [],
  "meta": {
    "created": "2020-10-25T09:27:40Z",
    "lastModified": "2020-10-25T09:27:40Z",
    "location": "https://mycompany.my.salesforce.com/services/scim/v2/Groups/00G4W000006IKBnUAO",
    "resourceType": "Group",
    "version": "2aa9ea6605cb4c31403cdfd1b020cde5dd255300"
  }
}
```