Script action set to run on session.established event does not run when impersonating a user.

Steps to Reproduce

  1. Log in to an instance with the Fuji release installed.
  2. Create a script action with the following settings:
    • Name: atest2
    • Event Name: session.established
    • Application: Global
    • Active: true
    • Synchronous: true
    • Script:

      gs.getSession().putProperty("custom.property", "myPropertyValue");
      gs.log("gs.getSession().getProperty('custom.property') is: "+gs.getSession().getProperty('custom.property'), "Background script");
      gs.log("current user is: "+gs.getUserID(),"Background script");
      gs.log("gs.getImpersonatingUserName(): "+gs.getImpersonatingUserName(), "Background script"); 

  3. Impersonate any user.
  4. Navigate to System Logs > System Log > All.
  5. Do one of the following:
    • Filter for debugging information
    • Append the following to the url:


      Note that the results show that the script action ran at login and impersonation. 

  6. Log in to an instance with the Geneva Patch 1 release installed.
  7. Repeat steps 2-5.
    Note that the results show that the script action ran only at login, not at impersonation.


Modify the ImpersonateEvaluator script include to have the following script:

var ImpersonateEvaluator = Class.create(); 
ImpersonateEvaluator.prototype = { 
initialize: function() {}, 
type: 'ImpersonateEvaluator', 
canImpersonate: function(currentUser, impersonatedUser) { 
gs.eventQueue('session.established', null, impersonatedUser.getName(), GlideTransaction.get().getRemoteAddr()); 
return true; 


The script include will then create the same session.established event as pre-Geneva instances.

Related Problem: PRB657274

Seen In

Geneva Patch 1
Geneva Patch 3 Hot Fix 2
Geneva Patch 7
Helsinki Patch 3
Helsinki Patch 3 Hot Fix 7
Helsinki Patch 5

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-03-21 15:11:47