SCIM Group resource: synchronize membership without changing access by accident
Learn how SCIM represents group members, how to make targeted membership changes, and why group-to-app permissions must be verified separately.
The SCIM Group resource represents a group name and references to its members in standard JSON. members normally contains SCIM resource IDs and reference URIs; a SCIM group does not itself define an app role or permission. Before mapping membership to access, confirm the source of truth, nested-group support, add/remove behavior, and the target service’s authorization policy.
Key Group fields
| Field | Meaning | Operational check |
|---|---|---|
id | Stable Group ID issued by the service provider | Client does not assign it; use it for later reads and updates |
externalId | Source group identifier assigned by the provisioning client | Interpret it in the client’s domain and check for collisions |
displayName | Human-readable group name | Required by RFC 7643; distinguish a rename from an identity change |
members | List of group members | Each member refers to a SCIM resource ID; User or nested Group may be allowed |
meta | Creation/modification time, version, and related metadata | Server-managed; do not update directly |
Member subattributes are immutable, but member entries may be added or removed. To change membership, remove the old reference and add the correct resource rather than changing an existing member’s value to another person’s ID. display is for readability, not the identity key.
Example Group
Fictional example. The service-issued id and metadata depend on the target’s contract; discover the schema before creating a resource.
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "group-id-from-service",
"externalId": "hr-group-ops",
"displayName": "Operations",
"members": [{
"value": "user-id-from-service",
"$ref": "https://scim.example.test/v2/Users/user-id-from-service",
"type": "User",
"display": "Jordan Lee"
}]
}The values are illustrative, not real people or service addresses. RFC 7643 defines $ref as a SCIM resource URI and value as the resource ID. Check /Schemas, /ResourceTypes, and product documentation to learn which member details the target returns or accepts.
Create a group and change membership
**Discover support.** Check `/ServiceProviderConfig`, `/Schemas`, and `/ResourceTypes` for Group, filters, and PATCH. Use nested groups only when the service confirms support.
**Identify the source group.** Document its stable source ID, target `displayName`, apps in scope, and membership rules. Do not merge source groups based only on their names.
**Resolve Users first.** Confirm that each `members.value` is the target service’s issued User `id`. Keep a safe mapping between source accounts and SCIM IDs.
**Create or retrieve the Group.** Use `POST /Groups` if needed and save the provider-issued Group ID. Use that resource ID for later membership changes.
**Choose replacement or partial update intentionally.** `PUT` or replacing all `members` can overwrite the full list. For partial synchronization, use a supported PATCH operation to add or remove selected members.
**Verify access effects.** Re-read membership after the change and, if groups map to app permissions, test that only the expected permissions were granted or removed.
To remove one member, RFC 7644 shows a PATCH valuePath such as members[value eq "user-id"] with remove. Do not try to change one immutable member subattribute; remove the old reference and add the correct one. Build actual URLs and request bodies from RFC 7644 and the target service’s documented PATCH support; the example is conceptual, not a copy-ready request.
Permissions and troubleshooting
SCIM carries membership data; it does not decide that an Engineering group is an app administrator. Check the target’s separate role mapping, permission inheritance, and nested-group evaluation. Test the permission effects of both adding and removing members, and record results so a failed sync can be reviewed.
**Adding a member returns 400:** verify the User ID belongs to the target tenant and that `$ref` and `type` match the supported form.
**The member list becomes empty:** check whether PUT or `replace members` replaced the full list; use a targeted PATCH for partial changes.
**A name appears instead of a user:** ensure the display string was not stored as the ID; remap the source account to its SCIM resource ID.
**Membership is right but app access is wrong:** investigate group-to-role mapping, nested-group evaluation, and permission caches separately.
**A source group is deleted but remains in the target:** agree whether the target should DELETE the Group, clear `members`, retain it, or deactivate it.
Group membership can reveal organizational structure and access. Protect SCIM bearer tokens with TLS, minimize group read/write permissions, and avoid storing full responses in logs or analytics systems.
References
[RFC 7643 — SCIM Core Schema, §§3.1, 4.2](https://www.rfc-editor.org/rfc/rfc7643.html)
[RFC 7644 — SCIM Protocol, §§3.3–3.6, 7](https://www.rfc-editor.org/rfc/rfc7644.html)