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: admincannot be deleted
Business Rules:
- Before deleting a user group, ensure:
- All users are removed from the group (delete all user group maps)
- All subgroups are deleted or moved to a different parent
- 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
- 200
- 401
- 404
OK - User group deleted successfully
Unauthorized - Authentication failed or missing required scope
Not Found - User group does not exist