how to generate a report of all active users with roles and recent activity

santa
Tera Contributor

I am looking for a way to generate a report of all active users with roles and recent activity - the ideal way to do this would be a report against the sys_user table with the following criteria:

Active is True

Roles is anything

Last login on This year

Unfortunately, Last login field is not being populated in our instance, and while I'm sure we could find a way to populate it to generate this report in the future, I need to find a way to report on this retroactively. We have a lot of accounts that are active with roles but we know are not being used, so looking for a way to list those to start deactivating them.

This would be a big help to help us with account management and save our organization some $ on licensing, so if anyone can provide a solution I would be very grateful and may have to buy lunch next time you're in LA LA land!

6 REPLIES 6

sachin_namjoshi
Kilo Patron
Kilo Patron

I ran across this share app the other day and it looks like it addresses your scenario.



ServiceNow Share - ITIL User Activity Report



Regards,


Sachin


Laxmikanth
Tera Expert

Hi Robert,



You can build your filter based on the last login time on the sys_user table. Also there are other ways you can identify the logins from Events or Syslog_transactions but that will not help for your reporting for the last 1 year.



You may find the below threads useful



How would I know when was the last time a user has logged in?


User login dates and times


Re: how to create a report to get all the logged in users in the last month


Last login time questions


Deepak Kumar5
Kilo Sage

Last login time comes OOB and it should be capture the time if you have not modified your basic Auth scripts(Script include).


if you have updated it, then add script in basic Auth to keep update Last login time.


I think it is the best way to use OOB rather than creating new field for this purpose.


Aditya Telideva
ServiceNow Employee
ServiceNow Employee