How to log out all users?

MarkD
Tera Expert

 

Does anyone know of a way to end all user sessions so that users need to sign in again?

 

There is a module for Logged In Users, however this only shows users on the same node as me.

 

I'm aware of a way to log out an individual via script with GlideSessions.lockOutSessionsInAllNodes(user_record), but where can I get a list of currently signed in users if the module only shows those that are on my node?

 

I would appreciate any input on this task!

Thanks

3 REPLIES 3

Mahathi
Mega Sage
Mega Sage

Hi @MarkD ,

I found a couple of KB articles on User analytics and Logged in Users tracking. 

Running the following query on sys_user_list will return all active users

https://.service-now.com/sys_user_session_list.do?sysparm_query=nameISNOTEMPTY%5EinvalidatedISEMPTY&sysparm_view=

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0749943

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864619


If my answer helped in any way, please mark it as Correct & 👍Helpful

Thanks,

Mahathi

Jitendra Diwak1
Kilo Sage

Hi @MarkD,

 

This table will let you the same "v_user_session" Open record and there you will get the Lock Out Session button then click on it then session will get terminated.

 

Please accept my solution if it resolves your issue and thumps up.

 

Thanks

Jitendra

Please accept my solution if it works for and thumps up.

Hi Jitendra, v_user_session is the same table that the Logged In Users module directs to. 

It does not display users on other nodes.