PUT api/groups/{id}/members?field={field}&clearGroup={clearGroup}
Adds one or more users to a specified group, with optional clearing of existing members.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
The unique identifier of the group to which users will be added. |
integer |
Required |
| field |
(Optional) The field used to identify users. Accepts "id", "username", or "email". Defaults to "id". |
string |
Default value is id |
| clearGroup |
(Optional) If true, clears all existing members from the group before adding new ones. Defaults to false. |
boolean |
Default value is False |
Body Parameters
A list of user identifiers (IDs, usernames, or emails) to be added to the group.
Collection of stringRequest Formats
application/json, text/json, application/scim+json
Sample:
[ "sample string 1", "sample string 2" ]
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
On success: HTTP 200 OK indicating users were added successfully. On failure: HTTP 400 Bad Request with a specific error message.
IHttpActionResultNone.
Response Formats
application/json, text/json, application/scim+json
Sample:
Sample not available.