Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

GlideImpersonate is not allowed in Scoped application.

vidyabb
Tera Contributor

We have a requirement to hide the application from the users who are impersonating the custom application users with respective to the specific roles in ACL . But getting an error message that impersonation is not allowed inside scoped application.

 

 

Below is the code :

if (GlideImpersonate().isImpersonating() && gs.getProperty('impersonation_check') == 'true')
answer = false;

2 REPLIES 2

anubhavritolia
Giga Sage

Hi @vidyabb 

 

Please refer below link for further help:

 

https://www.servicenow.com/community/developer-blog/is-not-allowed-in-scope-the-only-workaround-guid...

 

https://www.servicenow.com/community/developer-forum/gs-getsession-impersonate-in-scoped-application...

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

I want to restrict impersonation from admin user to impersonate application users