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****.


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.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "F76AF4FC-25E4-5CF1-B7CB-74F3CB72F0F0"

Error codes

For a list of error codes, visit the API Error Center.