Check if user accessing a form is impersonated?

Armin Heinlein1
Giga Expert

I want to block a user from accessing a form record if the user was impersonated by a user with the admin role. I control read access with ACL but of course the admin can impersonate   users that have a role with read access. Any suggestions?

3 REPLIES 3

Patrick DeCarl1
ServiceNow Employee
ServiceNow Employee

Could you add new GlideImpersonate().isImpersonating() to your Read ACL script?   It will return true if user is impersonating.


Steven1
Tera Expert

This doesn't sound like a technical issue. Maybe you need to talk to your Sys admin .


Well it could be an organizational problem. 🙂 I still need to control it though.The ACL works and blocks the user with admin from reading certain fields. What I want is to block users with the admin role impersonating another user with the proper role and then to read these confidential fields.