- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 07:27 PM
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),
This is a concept only screenshot I wish to build
I was wondering if anyone has built something similar or known any plug-in, that would accommodate this sort of reportability?
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2018 09:17 PM
Hello George,
I tried below code and it worked.
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
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 08:22 PM
Hi George
Whenever someone imporsonate servicenow event engine fire a event impersonation.start and when the impersonation end then fire another event impersonation.end.
You can write a event script and setup a table to capture the details and then you can setup a report on that
-Harsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 08:54 PM
Thanks Hash, I have set up a after business rule on the event log table, but it did not seem to fire anyhow (only fires on some other event which wasn't about impersonation), is it because the creation of event log on impersonation bypasses workflow (current.setWorkflwo(false)) to lead the BR not firing?
Thanks advice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 09:36 PM
Hello George,
The best approach instead of BR would be script action. Script Actions are server side code which runs whenever an event triggers.
https://docs.servicenow.com/bundle/london-platform-administration/page/administer/platform-events/reference/r_ScriptActions.html
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 09:39 PM
Thanks Ali, I will give it a crack and update you later about my attempts.
Cheers,
George