User Impersonation report in ServiceNow Kingston

georgechen
Kilo Guru

Hello folks, 

I've come to take a challenge to build a reporting in system with user impersonation which will be used by Management to use in case any reasons may raise. 

 

I have some investigation from ServiceNow Doc and noticed a sys_property can be enabled to enable the logging, however, the OOTB log appears to be very basic (in syslog table), 

find_real_file.png

This is a concept only screenshot I wish to build 

find_real_file.png

 

I was wondering if anyone has built something similar or known any plug-in, that would accommodate this sort of reportability? 

 

Thanks in advance. 

 

1 ACCEPTED SOLUTION

Hello George,

 

I tried below code and it worked.

find_real_file.png

find_real_file.png

 

but in above parm1 and parm2 giving user ID, not full name. you can get full name by querying user table.

 

but by thought was to user a custom table to store these logs, as system log table will have very huge data, and i think (not sure) it will be cleared after a specified time.

so by storing his data on a new custom table, you have a historical data also (if needed).

else system log is good.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

8 REPLIES 8

Hello Ahmmed, 

just to share my first attempt to create Script Action against impersonation.start,

find_real_file.png

 

When this is set, and i start impersonating users, it writes to sys_log which is looking good, but in the script not sure I have current object , if not, I need to query sysevent table to fetch parm2 which is the impersonating user and the sys_created_on to write onto my customer table. 

 

Will keep working on this and share 

 

Thanks again. 

Hello George,

 

I tried below code and it worked.

find_real_file.png

find_real_file.png

 

but in above parm1 and parm2 giving user ID, not full name. you can get full name by querying user table.

 

but by thought was to user a custom table to store these logs, as system log table will have very huge data, and i think (not sure) it will be cleared after a specified time.

so by storing his data on a new custom table, you have a historical data also (if needed).

else system log is good.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

You need to create a script action instead of the business rule. in the script you can capture the param1 and param2 add put them in a table

Thanks Harshtimes, just realised this

find_real_file.png

 

find_real_file.png

Your tip is very helpful