You are currently viewing How To Lockout Users In ServiceNow?

How To Lockout Users In ServiceNow?

Hello,

Welcome to ServiceNow Spectaculars.

In this article, we discuss the number of ways to lock out users from a ServiceNow instance. There are many ways and reasons to do so.

So, lets get started.

Don’t forget to subscribe to the blog for all the latest amazing articles to come.

Why do we lock out users?

There are many reasons to lock out users from a ServiceNow instance. Lets enumerate it below:

  • To do some custom activity
  • To block users from logging in for some time
  • During configuring, upgrading, patch installation, etc
  • For security reasons

Ways to lock out users?

There are many ways, and in this article we discuss two of them.

Using user records

  • To lock out a user from user record, go to User Administration -> Users -> Open User record
  • Go to the Locked Out Checkbox and check it.
  • After this, ,if the user is logged IN , he will be locked out immediately and will not be able to login until the flag is removed.
  • When user try to login he get a error message and login denied.
  • This is a kind of permanent locking out of the users for as long as the admin wants.
  • However, the user record is Active.

Lockout Users Using Scripting (One-Time Lockout)

  • This is a one time lockout
  • Using below script will instantly lock out the user and terminate the user session
GlideSessions.lockOutSessionsInAllNodes("user_name");
  • Just provide the user_name and execute it in background script.
  • The user can login again after being locked out.
end footer

Leave a Reply