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
groupIdas 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
groupIdmatching the path parameter - Each user group map must comply with validation rules:
sub: Required, must be a valid user ID (UUID format), user must existgroupId: Required, must match the path parameter exactlyroles: 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
- 200
- 400
- 401
OK - Bulk operation completed. Check the response for individual success/failure status of each user assignment.
Bad Request - Request body is invalid (e.g., not an array, empty array, groupId mismatch, or malformed user group map objects)
Unauthorized - Authentication failed or missing required scope