Skip to main content
Browse Documentation

Unlock a user

Created by Chris Neale, last updated 06 Dec 2020

If a user account has been locked by an administrator or from too many incorrect password attempts, the account can be unlocked by calling

  • Unlock
  • UnlockAsync

Syntax

public void Unlock()
{   
}
public async Task UnlockAsync()
{   
}

Examples

Unlock a user.

using Zengenti.Contensis.Management;

// Create a client
var client = ManagementClient.Create();

// Get the user
User user = client.Security.Users.Get("t.durden");

// Unlock the user
user.Unlock();

Unlock a user asynchronously.

using Zengenti.Contensis.Management;

// Create a client
var client = ManagementClient.Create();

// Get the user
User user = client.Security.Users.Get("t.durden");

// Unlock the user asynchronously
await user.UnlockAsync();