Smartsheet.Api.Internal.GroupResourcesImpl.AddGroupMembers C# (CSharp) Method

AddGroupMembers() public 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

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public AddGroupMembers ( long groupId, IEnumerable groupMembers ) : IList
groupId long the Id of the group
groupMembers IEnumerable array of Group Member objects
return IList
        public virtual IList<GroupMember> AddGroupMembers(long groupId, IEnumerable<GroupMember> groupMembers)
        {
            return this.PostAndReceiveList<IEnumerable<GroupMember>, GroupMember>("groups/" + groupId + "/members", groupMembers, typeof(GroupMember));
        }