Cookie control banner

We use cookies to ensure our website works properly, deliver personalised advertising, and collect usage statistics to help us improve the website. You may change your settings at any time or accept the default settings. For more information, please refer to our privacy policy.
Skip to main content

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

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

Examples

Unlock a user.

C#
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.

C#
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();

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request