Skip to main content

A user can be suspended using the following call:

suspendUser(userId: string): Promise<void>

Remarks

The userId can be username, email address or a GUID identifier.

If the user is not found then an exception with a 404 Not found is thrown.
If there are no permissions to suspend a user then an exception with a 403 Forbidden status is thrown.

Example

JavaScript
client.security.users.suspendUser("4b262379-5bbe-421e-a429-f6e2ab5a849b")
    .then( result => {
        console.log('API call was successful');
    })
    .catch(error => {
        console.log('API call error: ', error);        
    });

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