Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to elevate role programmatically

olivierbousquet
Tera Expert

I am looking for a piece of code to evelate the role programmatically ?

My context is following :

  • My app deals with roles and ACLs,
  • We are currently developping a plugin to integrate with ServiceNow,
  • We use ServiceNow REST APIs to do so :
    1. creation roles with REST API,
    2. modification of ACL (attach a role to an ACL)

To perform 1, everything is fine.

To perform 2, we need first to elevate role to make it possible.

Is it possible to elevate role programmatically ?

Thanks in advance, Olivier

2 REPLIES 2

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Olivier,



You should be able to update the table sys_security_acl_role table directly with out elevating permissions.


Manjeet Singh
ServiceNow Employee
ServiceNow Employee

Check out this thread - Running Script with Elevated Access