Adds a user to a group.
Usage notes
If System for Cross-domain Identity Management (SCIM) synchronization is enabled, you cannot add a user to a group that is synchronized by using SCIM.
This topic provides an example of how to add the user u-00q8wbq42wiltcrk****
to the group g-00jqzghi2n3o5hkh****
.
Limits
You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddUserToGroup |
The operation that you want to perform. Set the value to AddUserToGroup. |
GroupId | String | Yes | g-00jqzghi2n3o5hkh**** |
The ID of the group. |
UserId | String | Yes | u-00q8wbq42wiltcrk**** |
The ID of the user. |
DirectoryId | String | Yes | d-00fc2p61**** |
The ID of the directory. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | F76AF4FC-25E4-5CF1-B7CB-74F3CB72F0F0 |
The ID of the request. |
Examples
Sample requests
https://[Endpoint]/?Action=AddUserToGroup
&GroupId=g-00jqzghi2n3o5hkh****
&UserId=u-00q8wbq42wiltcrk****
&DirectoryId=d-00fc2p61****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddUserToGroupResponse>
<RequestId>F76AF4FC-25E4-5CF1-B7CB-74F3CB72F0F0</RequestId>
</AddUserToGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "F76AF4FC-25E4-5CF1-B7CB-74F3CB72F0F0"
}
Error codes
For a list of error codes, visit the API Error Center.