Click or drag to resize

GroupResourcesAddGroupMembers Method

Adds one or more members to a Group.

Remarks

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
Assemblies:   smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
  smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
Syntax
IList<GroupMember> AddGroupMembers(
	long groupId,
	IEnumerable<GroupMember> groupMembers
)

Parameters

groupId
Type: SystemInt64
the Id of the group
groupMembers
Type: System.Collections.GenericIEnumerableGroupMember
array of Group Member objects

Return Value

Type: IListGroupMember
the members added to the group
Exceptions
ExceptionCondition
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
See Also