Skip to main content

UserPassword

Resets a user's password to the specified value. This is an administrative operation — the caller must hold sufficient authorization to modify the target user's account.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature

bool UserPassword(string SessionID, int UserID, string NewPassword)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
UserIDintYesUnique identifier of the user whose password is being reset
NewPasswordstringYesNew password — must satisfy complexity requirements

:::note Password Requirements Passwords must match: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).+$

At least one lowercase letter, one uppercase letter, one digit, and one special character are required. :::

Response

Returns true if the password was successfully updated; throws a SOAP fault on failure (e.g., insufficient auth level or password complexity violation).

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

Code Examples

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

var config = new ConfigurationBuilder().AddEnvironmentVariables().Build();
var newPassword = config["RESET_PASSWORD"]
?? throw new InvalidOperationException("RESET_PASSWORD is not set.");

var client = new ECGridOSPortTypeClient();

// Reset password for user 5001 — requires admin-level session
bool success = await client.UserPasswordAsync(
sessionID,
UserID: 5001,
NewPassword: newPassword);

if (success)
{
Console.WriteLine("Password reset successfully.");
}

REST Equivalent

See Update PasswordPOST /v2/users/password.