Track when a user logins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2013 11:58 AM
Created a new u_user_login table that wanting to track everytime a user logs in. I need to run reports to see how many times a person/dept is logging inot the instance.
I created a business rule on the new table with the following settings:
When:after
Insert:yes
Active:yes
Script
var gr = new GlideRecord("u_user_login");
if (current.operation() == 'login')
{
gr.sys_created_by = event.parm1;
gr.sys_created_on = event.parm2;
}
I used the default columns that were created with the table as I just need to track the user and the date.
I am not sure if I am using the current.operation correctly and I am not seeing a record getting inserted into the new table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2016 09:56 AM
Hi All,
I need to capture user logins details with login timings, protocol and Ip address of the user. If the user logged in successfully or not must be reflect in next column after logging time and date,
is it feasible or not, can someone help me with with.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2018 02:24 AM
There's an event called login.failed and login.authorization.failed you may want to look into that or if you're using external authentication, there's an event name that starts with external.authentication.
https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/integrate/single_sign_on/reference/r_EventQueueLoginActivities.html