RemoveUser() public method

Removes a User from an organization. User is transitioned to a free collaborator with read-only access to owned sheets (unless those are optionally transferred to another user).

This operation is only available to system administrators.

It mirrors To the following Smartsheet REST API method: DELETE /user{Id}

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 RemoveUser ( long userId, long transferTo, bool transferSheets, bool removeFromSharing ) : void
userId long the Id of the user
transferTo long (required if user owns groups): The ID of the user to transfer ownership to. /// If the user being deleted owns groups, they will be transferred to this user. /// If the user owns sheets, and transferSheets is true, then the deleted user’s sheets will be transferred to this user.
transferSheets bool If true, and transferTo is specified, the deleted user’s sheets will be transferred. Else, sheets will not be transferred. Defaults to false.
removeFromSharing bool Set to true to remove the user from sharing for all sheets/workspaces in the organization. If not specified, User will not be removed from sharing.
return void
        public virtual void TestDeleteUser()
        {
            server.setResponseBody("../../../TestSDK/resources/deleteUser.json");

            userResources.RemoveUser(123L, 456L, false, null);
        }