Click or drag to resize

UserResourcesRemoveUser 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).

Remarks
This operation is only available to system administrators.

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

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
void RemoveUser(
	long userId,
	Nullable<long> transferTo,
	Nullable<bool> transferSheets,
	Nullable<bool> removeFromSharing
)

Parameters

userId
Type: SystemInt64
the Id of the user
transferTo
Type: SystemNullableInt64
(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
Type: SystemNullableBoolean
If true, and transferTo is specified, the deleted user’s sheets will be transferred. Else, sheets will not be transferred. Defaults to false.
removeFromSharing
Type: SystemNullableBoolean
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.
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