Homepage / Doc / Lock User

Lock User

The LockUser method can be utilized to “lock” a user out of the Checkbox application. This method will return true if the user was successfully locked. If the user was already locked prior to executing this method, the result data will still be true. Locking a user prevents them from logging into the Checkbox application, it also denies them access to the Checkbox API.

class Test
{
    private static void Main()
    {
        dynamic client = new UserManagementServiceClient();

        dynamic lockUserResponse = client.LockUser(authToken, "Test-UserName");

        if (!lockUserResponse.CallSuccess) {
            Console.WriteLine(lockUserResponse.FailureMessage);
            return;
        }

        dynamic lockUserData = lockUserResponse.ResultData;
        //If this is true, then the lock was successful
        Console.WriteLine(lockUserData ? "Locking of user was successful" : "Locking of user was not successful");

        //Always close the client
        client.Close();
    }
}

 

Input Parameters

Parameter Type Description
authToken string Authentication token to validate permission over the data requested
uniqueIdentifier string Username of the user that you wish to lock
November 15, 2016