Servicenow Impersonate Query

SH40171025
Tera Contributor

How can we check who has impersonated our instance over a period of time?

Is there any way or any method to do access Impersonate counting's?

6 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @SH40171025 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0717055

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

yella123
Tera Expert

To retrieve information about impersonation in your instance, follow these steps:

  1. Navigate to "sys_properties.list"
  2. Click New
  3. Fill in the new property with the following values:
    • Name: glide.sys.log_impersonation
    • Type: true/false
    • Value: true
  4. Save
  5. Go back to "sys_properties.list" and show List view
  6. Type "glide.sys.log_impersonation" in the Name column and press Enter to confirm the property has been added.
  7. Perform a cache flush by typing "cache.do" in the navigator
  8. Log out then Log in again

After logging back in, you can see the history of impersonation in a system log by:

  1. Navigating to System log > All
  2. Type "*impersona" in the Message column and press Enter
  3. You will see the history of impersonations in the system log by looking for messages like:
    • "Impersonation start:"
    • "Impersonation end:"

View solution in original post

Chaitanya ILCR
Kilo Patron

Hi @SH40171025 ,

in addition to what @Dr Atul G- LNG has shared 

you can check the user preferences tables for each users impersonations 

where name = recent.impersonations

 

ChaitanyaILCR_0-1750759892731.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

rcunning
Tera Expert

Very useful. Thanks all!

View solution in original post

Please accept answers and close the thread.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

GlideFather
Tera Patron

Hello @SH40171025,

I just tried in my client's instance and no system property is needed to create. The glide.sys.log_impersonation as per suggested KB is not existing in my client's and still you can check the logs.

Simply change your URI accordingly and navigate to:
https://your-instance.service-now.com/syslog_list.do?sysparm_query=sys_created_onONThis%20month%40ja...
(the query has applied filter for the last month, you can adjust it)

And you can see who impersonated for whom and when it was.

Search in the Sys Log for:
Impersonation start
Impersonation end

———
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */


View solution in original post

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @SH40171025 

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0717055

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

yella123
Tera Expert

To retrieve information about impersonation in your instance, follow these steps:

  1. Navigate to "sys_properties.list"
  2. Click New
  3. Fill in the new property with the following values:
    • Name: glide.sys.log_impersonation
    • Type: true/false
    • Value: true
  4. Save
  5. Go back to "sys_properties.list" and show List view
  6. Type "glide.sys.log_impersonation" in the Name column and press Enter to confirm the property has been added.
  7. Perform a cache flush by typing "cache.do" in the navigator
  8. Log out then Log in again

After logging back in, you can see the history of impersonation in a system log by:

  1. Navigating to System log > All
  2. Type "*impersona" in the Message column and press Enter
  3. You will see the history of impersonations in the system log by looking for messages like:
    • "Impersonation start:"
    • "Impersonation end:"

Chaitanya ILCR
Kilo Patron

Hi @SH40171025 ,

in addition to what @Dr Atul G- LNG has shared 

you can check the user preferences tables for each users impersonations 

where name = recent.impersonations

 

ChaitanyaILCR_0-1750759892731.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

rcunning
Tera Expert

Very useful. Thanks all!