Add ACL Role
add_acl_roleAdds a role to a ServiceNow ACL so users holding it pass the role check and gain access to the ACL’s scripts; confirm the access change with the user before applying it.
Instructions
Add a role to an access control: users with that role then pass its role check (roles are alternatives), and reach any script the ACL has. This is a security change: before calling it, tell the user who gains or loses access and get their go-ahead. It elevates its own session to security_admin (only for ACL tools; other tools stay unelevated) and writes into the named update set, verifying each write by reading it back. To swap a role, add the new one before removing the old.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | The role name to add. | |
| scope | No | The ACL's application: its scope name (e.g. "x_acme_app"), or "global". Give this or scope_id. | |
| sys_id | Yes | The ACL's sys_id. | |
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| scope_id | No | The ACL's application by sys_scope sys_id, instead of scope. | |
| update_set | Yes | sys_id of an In progress update set of that application (create one with create_update_set). Every write is captured there and verified; the user's own current update set is left as it is. | |
| acknowledge_upgrade_skip | No | Only for an installed Store application, and only after the user has reviewed it: upgrades of that application then skip this ACL until the customization is reviewed. |