Skip to content

SCIM PATCH remove on members with a value list answers 200 and removes nobody #55307

Description

@Prasad484

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

scim

Bug Description

A SCIM PATCH that removes group members by listing them in the operation's value, with no filter in the path, returns 200 and removes nobody:

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

This is the form Microsoft Entra ID uses to remove a member from a provisioned group. Because the server reports success, Entra records the member as removed while the user stays in the Keycloak group. Nothing in Keycloak's logs or in the response shows that the request was ignored.

RFC 7644 section 3.5.2.2 defines remove with a path and, for multi-valued attributes, the filter form. Answering 200 while ignoring the value is the problem here; either honouring the value or refusing the request with 400 would be safe.

Version

main (f2326fc, 18 November 2026). Also reproduced on a29205c (14 November).

Regression

  • The issue is a regression

Expected behavior

The members listed in value are removed. A listed user who is not a member is ignored, as with the filter form. An unknown user id fails the whole request with 400 and removes nobody.

Actual behavior

200 OK, and every listed member is still in the group.

If the group also holds a service account, the request is refused instead, so a person cannot be removed from such a group this way at all.

How to Reproduce?

  1. Enable SCIM on a realm and create a group with two members through SCIM.
  2. Send the PATCH above with one member's id.
  3. GET the group with attributes=members: both members are still present.

Anything else?

Searched existing issues for "SCIM", "remove", "members", "value", "PATCH" and "Entra" on 18 November 2026. No issue covers removing by value.

Related issues, each a different case:

A fix is ready with tests (remove by value; a member entry without a value gives 400; a filter and a value together give 400; service accounts stay protected). I can open a pull request if a maintainer agrees with the approach. This text and the pull request were prepared with the help of an AI coding assistant, as CONTRIBUTING.md asks contributors to disclose.

Activity

  1. added theissue type on Nov 18, 2026
  2. added
    area/scimSCIM — user and group provisioning, filtered search, PATCH operations
    on Nov 18, 2026
  3. added 5 commits that reference this issue on Nov 18, 2026
    20223cb
    d3fc17e
    98d7999
    197c931
    e62baab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/scimSCIM — user and group provisioning, filtered search, PATCH operationskind/bugCategorizes a PR related to a bugstatus/triageteam/core-iam

    Type

    Fields

    No fields configured for bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions