gs.getSession().impersonate() in scoped application?

vks
Kilo Expert

I have a ServiceNow Application which is programatically called from a Windows Application via Processor. Windows Application sends a username and token to impersonate. In global application I used to do this quite easily by validating the username and token and calling this api:

gs.getSession().impersonate(<user_sys_id>);

Now that Scoped GlideSession doesn't expose impersonate, how could I achieve this?

Thanks,

Vipin

12 REPLIES 12

This worked for me, thank you

Tim D Scott
Giga Guru

Hi,

We have an app that uses impersonation (via a global script) that we need to submit to the store. Are the solutions mentioned in this post still current, or have things changed in the last few releases?

Thanks,

Tim.

There is still no scoped API equivalent for this.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022