# Bug SI-193 - Managing group membership does not work in Keycloak plugin setup.

Project: Stream Integration Basics
Status: closed
URL: https://community.openproject.org/work_packages/SI-193

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | API / SCIM |
| Target versions | 16.2.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Pavel Balashou |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Setup Keycloak with https://github.com/mitodl/keycloak-scim
    
2.  Setup SCIM Provisioning in OpenProject with Keycloak as a SCIM client
    
3.  Try to add/remove user to/from group
    
4.  Receive 400 Bad request with Invalid request message
    

### What is the buggy behavior?

*   $ref field for members breaks addition
    
*   when group is empty then members field is absent from update group request
    

### What is the expected behavior?

1.  Adding members to a group works.
    
2.  Removing members from a group works.
