- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 04:14 AM
How can we get a list of logged in users using REST API or check if a user is online or not using REST API.
Solved! Go to Solution.
- Labels:
-
Service Level Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 05:25 AM
Hi Sachit,
You can query the v_user_session table to find active sessions. Use the REST API Explorer to change the returned results. See below example
GET https://yourinstanceID.service-now.com/api/now/table/v_user_session?sysparm_query=user!%3Dguest&sysparm_limit=1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 05:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 05:34 AM
Hi Sachit,
this table stores the logged in users "v_user_session"; It stores User and whether the session is Active or not.
once user logs out the entry for that user is removed from this table.
So you can use this table with below query in REST API
Http Method: GET
Endpoint: https://instanceName.service-now.com/api/now/table/v_user_session?sysparm_query=active%3Dtrue
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader