You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding the same user as multiple members in a single request results in listing the same user twice in the group #3354
When adding users to a group using the Graph API, and referencing the same user ID multiple times in the member list, that user ends up being in that group twice.
Important
Note that this only affects the built-in IDM (see libregraph/idm#209), as OpenLDAP treats those LDAP modify operations as errors instead.
Steps to reproduce
Setting a few environment variables to make copy-pasting the snippets below more portable:
The snippets below require having curl and jq, optionally shuf to automate picking a random user, as well as basic authentication support (PROXY_ENABLE_BASIC_AUTH=true) to simplify the code below.
Optionally create a new group
curl -sSk -u "$auth" -X POST "$api/graph/v1.0/groups" -d '{"displayName": "'"$groupname"'"}'
Normalize the list of member IDs to skip duplicates, as it makes no sense to have the same user being a member of a group twice. Ideally, this should also be caught on the IDM side of things, but as part of data sanitization, the Graph API should catch that as well.
When using the snippets above, the user should only show up once in the list of members of the group, instead of twice.
Actual behavior
The user is listed twice, and is thus stored twice as a member of that group.
With the snippets above, the expected output of the group member listing code (point 4) would be the user being referenced once, not twice, for example
801abee4-dd7f-11ef-a324-83f55a754b62
Setup
No particular setup is necessary (except allowing basic authentication to simplify the code snippets above to reproduce the issue).
Activity
fix(graph): adding the same user as multiple members in a group (open…
fix(graph): adding the same user as multiple members in a group (#3354)
chore(deps): update opencloudeu/opencloud-rolling docker tag to v7.5.0
chore(deps): update opencloudeu/opencloud-rolling docker tag to v7.5.0 (