UserReset
Invalidates all open sessions for the specified user, forcing them to re-authenticate on their next request.
:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::
Method Signature
bool UserReset(string SessionID, int UserID)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
SessionID | string | Yes | Active session token from Login() |
UserID | int | Yes | Unique identifier of the user whose sessions will be invalidated |
Response
Returns true if all sessions were successfully invalidated; throws a SOAP fault on failure.
<!-- Example response XML -->
<UserResetResult>true</UserResetResult>
:::tip Use Case
Call UserReset when a user's credentials may have been compromised, after a password change, or as part of an offboarding workflow to ensure no active sessions remain.
:::
Code Examples
- C#
- Java
- Node.js
- Python
// .NET 10 — dotnet-svcutil generated proxy
using ECGridOSClient;
var client = new ECGridOSPortTypeClient();
// Invalidate all sessions for user 5001
bool success = await client.UserResetAsync(sessionID, UserID: 5001);
if (success)
{
Console.WriteLine("All sessions for user 5001 have been invalidated.");
}
// JAX-WS generated client
// wsimport -s src https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL
ECGridOS service = new ECGridOS();
ECGridOSPortType port = service.getECGridOSPort();
var result = port.UserReset(sessionID /*, additional params */);
System.out.println(result);
// npm install soap
import soap from 'soap';
const WSDL = 'https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL';
const client = await soap.createClientAsync(WSDL);
const [result] = await client.UserResetAsync({
SessionID: sessionId,
// additional params
});
console.log(result);
# pip install zeep
from zeep import Client
WSDL = 'https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL'
client = Client(WSDL)
result = client.service.UserReset(
SessionID=session_id,
# additional params
)
print(result)
REST Equivalent
See Reset Sessions — POST /v2/users/reset/{id}.