Skip to main content

Delete user group

DELETE 

/groups-srv/usergroups/:groupId

This API call removes the user group with given groupId if it is unused.

Validation Rules:

  • The user group must exist in the system
  • The user group must not have any users assigned (all user group maps must be removed first)
  • The user group must not have any subgroups (all child groups must be deleted first)
  • User groups with groupOwner: admin cannot be deleted

Business Rules:

  • Before deleting a user group, ensure:
    1. All users are removed from the group (delete all user group maps)
    2. All subgroups are deleted or moved to a different parent
    3. The group is not referenced in app settings or other configurations
  • System-managed user groups (groupOwner: admin) are protected and cannot be deleted
  • Deleting a user group also removes all associated user group maps and role assignments
  • This operation cannot be undone

Request

Responses

OK - User group deleted successfully