- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 06:02 AM
Hi All,
I need to create a report whicjh should contains the users count and details logged in the last month.
could any one please advice on this.
Thanks and regards,
Swamy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 06:17 AM
If you run a report on the sys_user table, one of your filter conditions is last log in time. Just use whatever time criteria you wanted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 01:14 AM
Hi Naveen,
We have a field called "Last login time" on user table and it will capture the last date/time stamp when user logged in.
Thanks and regards
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 01:23 AM
Hi Swamy,
Yes i just tried out the steps u mentioned here and it worked out for me..
Thank you so much for your quick response...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2016 05:29 AM
If i impersonate any user, then the last login time is updated as well, now i want to exclude them. How can i differentiate whether the last login time was update during user's login or during impersonation for testing purposes.
Thanks and regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2016 07:29 AM
Honestly, I don't know that there is a way to do that on this report. I think the only way to differentiate between an impersonate or true log in is in the systems logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 06:59 AM
Swamy,
The "last login time" won't get you the history of users who logged in last month, because the field gets updated everytime a user logs in. So if they logged in last month, then logged in today, the last login time would show today's date.
OOTB the event logs(name login) keeps track of user logins but only goes back 1 day rotation. Same with the transaction logs with url starting with /login.do however, these logs are only 7 days rotation. See wiki link for log history. You could adjust the rotation but Highly wont recommend that.
Viewing System Logs - ServiceNow Wiki
With that said, if you need to develop this report on a monthly bases, then I would create a custom table to house all users login times so you can report history over time. Just have a new table setup and a Business rule on sys_user table to trigger with last login time changes to insert record in new custom table.