Delete all user group maps for a user
DELETE/groups-srv/usergroups/maps/:sub
This API call removes all user group memberships for a specific user (sub). Optionally, you can transfer the user group memberships to another user by providing a transferSub parameter in the request body.
Operation Behavior:
- Removes all group memberships for the specified user
- All roles assigned to the user across all groups are removed
- If
transferSubis provided, all group memberships (including roles) are transferred to the target user
Transfer Functionality:
- When
transferSubis provided, all group memberships are moved to the target user - The target user receives all the same group memberships and roles
- If the target user already has memberships in some of these groups, roles are merged (not replaced)
- Useful for account consolidation or user migration scenarios
Validation Rules:
sub: Required (path parameter), must be a valid user ID (UUID format), user must existtransferSub: Optional (request body), if provided must be a valid user ID (UUID format), user must exist- The user must have at least one group membership to delete (otherwise returns 404)
Business Rules:
- This operation permanently removes all group memberships for the user
- If transferSub is used, the target user must exist and be accessible
- Role validation applies when transferring - if target user cannot have certain roles in a group, those roles are not transferred
- This operation cannot be undone - users will need to be re-added to groups to regain access
- System-managed group memberships may have additional restrictions
Request
Responses
- 200
- 401
- 404
OK - All user group memberships removed successfully (or transferred if transferSub was provided)
Unauthorized - Authentication failed or missing required scope
Not Found - User not found or no group memberships exist for this user