Reporting last login of platform admins

c_correa133
Tera Contributor

I'm looking to use the reports feature to pull a report showing the last login of admins on the platform. When I run a report using the Sys_user table, I'm able to view last logins time and date. However, this shows the logins of all users on the platform and I'm unable to filter by roles. 

 

If I attempt to use the Sys_user_has_role I can see the admin users I am looking for, but I cannot add the last login column. It also appears I cannot search both tables together in reports. 

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

HI @c_correa133 ,
I trust you are doing great.

To pull a report showing the last login of admins on the platform, you can follow these steps:

  1. Navigate to the "Reports" module in ServiceNow.
  2. Click on "New" to create a new report.
  3. In the "Table" field, select "sys_user" table.
  4. Choose the desired fields you want to include in the report, such as "User ID" and "Last Login".
  5. Click on the "Advanced" tab.
  6. In the "Filters" section, click on "Add Filter Condition".
  7. Choose the field "Roles" and select the role(s) of the admin users you want to include in the report.
  8. Save the report and run it.

By following these steps, you will be able to generate a report that shows the last login time and date for admin users only.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Thanks! Where can I find the "advanced tab" after selecting the desired fields/columns? 

I attempted the steps I took earlier in a personal developer instance and was able to do what was needed. Seems I may be lacking permissions to display roles while looking at the sys_user table.