Skip to main content

Assign many users to an user group

POST 

/groups-srv/bulk/usergroups/:groupId/users

This API call bulk adds or updates users to a user group.

Operation Behavior:

  • Processes multiple user group maps in a single API call
  • All user group maps must reference the same groupId as specified in the path parameter
  • Each user group map in the array is processed independently
  • If a user group map for a user already exists, it will be updated with new roles
  • If a user group map for a new user is provided, it will be created
  • The operation continues processing even if individual items fail

Validation Rules:

  • Request body must be a valid JSON array
  • Array must contain at least one user group map object
  • All user group maps must have groupId matching the path parameter
  • Each user group map must comply with validation rules:
    • sub: Required, must be a valid user ID (UUID format), user must exist
    • groupId: Required, must match the path parameter exactly
    • roles: Optional array, all roles must exist and be allowed by the group's groupType

Business Rules:

  • All user group maps in the batch must reference the same groupId as the path parameter
  • Role validation follows the same rules as individual user group map creation
  • The operation is not fully atomic - some items may succeed while others fail
  • Check the response to identify which user assignments were successful and which failed

Request

Responses

OK - Bulk operation completed. Check the response for individual success/failure status of each user assignment.