Skip to main content

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 transferSub is provided, all group memberships (including roles) are transferred to the target user

Transfer Functionality:

  • When transferSub is 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 exist
  • transferSub: 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

OK - All user group memberships removed successfully (or transferred if transferSub was provided)