Skip to main content

UserSuspend

Suspends a user account, preventing login while preserving the account for future reactivation.

:::caution Established API The SOAP API is in maintenance mode. There is no direct REST equivalent — use Update User (PUT /v2/users) to update the user's status field. :::

Method Signature

bool UserSuspend(string SessionID, int UserID)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
UserIDintYesUnique identifier of the user account to suspend

Response

Returns true if the account was successfully suspended; throws a SOAP fault on failure.

<!-- Example response XML -->
<UserSuspendResult>true</UserSuspendResult>

:::tip Reversible Action Suspension is reversible. The account retains all configuration and history. To permanently remove access, use UserTerminate instead. :::

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
using ECGridOSClient;

var client = new ECGridOSPortTypeClient();

// Suspend user 5001 — account is disabled but not deleted
bool success = await client.UserSuspendAsync(sessionID, UserID: 5001);

if (success)
{
Console.WriteLine("User 5001 has been suspended.");
}

REST Equivalent

There is no direct REST equivalent for this operation. To achieve the same result via REST, call Update User (PUT /v2/users) and set the user's status to Suspended.