GroupResourcesAddGroupMembers Method | ![]() |
Adds one or more members to a Group.
If called with a single GroupMember object, and that group member already exists, error code 1129 will be returned. If called with an array of GroupMember objects any users specified in the array that are already group members will be ignored and omitted from the response.
This operation is only available to group administrators and system administrators.
This operation is asynchronous, meaning the users may not yet have sharing access to sheets for a period of time after this operation returns. For small groups with limited sharing, the operation should complete quickly (within a few seconds). For large groups with many shares, this operation could possibly take more than a minute to complete.
It mirrors to the following Smartsheet REST API method: POST /groups/{groupId}/members
Namespace: Smartsheet.Api
IList<GroupMember> AddGroupMembers( long groupId, IEnumerable<GroupMember> groupMembers )
Exception | Condition |
---|---|
InvalidOperationException | if any argument is null or empty string |
InvalidRequestException | if there is any problem with the REST API request |
AuthorizationException | if there is any problem with the REST API authorization (access token) |
ResourceNotFoundException | if the resource cannot be found |
ServiceUnavailableException | if the REST API service is not available (possibly due to rate limiting) |
SmartsheetException | if there is any other error during the operation |