Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Cross-Scope Privilege API - ServiceNow Fluent

The Cross-Scope Privilege API defines cross-scope privileges [sys_scope_privilege] for runtime access tracking.

Note: For the latest ServiceNow Fluent API documentation and examples, see the ServiceNow Fluent API reference and ServiceNow SDK examples repository on GitHub.

Runtime access tracking allows administrators to manage script access to application resources by creating a list of script operations and targets that the system authorizes to run. For general information about cross-scope privileges, see Cross-scope privilege record.

Parent Topic:ServiceNow Fluent API reference

Related topics

ServiceNow Fluent

CrossScopePrivilege object

Configure cross-scope privileges [sys_scope_privilege] that determine which script operations and targets the system allows to run in the application.

NameTypeDescription
$idString or NumberRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\_id. For more information, see ServiceNow Fluent language constructs.Format: `Now.ID['String' or Number]`
statusStringRequired. The authorization for this record.Valid values: - requested - allowed - denied
operationStringRequired. The operation that the script performs on the target. The target type determines the available operations. Tables \[sys\_db\_object\] support the read, write, create, and delete operations. Script includes \[sys\_script\_include\] and script objects \[sys\_db\_object\] only support the execute operation. Valid values: - create - delete - read - write - execute
targetNameStringRequired. The name of the table, script include, or script object being requested.
targetScopeStringRequired. The application scope from which resources are requested.
targetTypeStringRequired. The type of request: script include, script object, or table.Valid values: - sys\_script\_include - scriptable - sys\_db\_object
$metaObject

Metadata for the application metadata.With the installMethod property, you can map the application metadata to an output directory that loads only in specific circumstances.

$meta: {
      installMethod: 'String'
}

Valid values for installMethod:

  • demo: Outputs the application metadata to the metadata/unload.demo directory to be installed with the application when the Load demo data option is selected.
  • first install: Outputs the application metadata to the metadata/unload directory to be installed only the first time an application is installed on an instance.
import { CrossScopePrivilege } from '@servicenow/sdk/core'

CrossScopePrivilege({
   $id: Now.ID['cross_1'],
   status: 'allowed',
   operation: 'execute',
   targetName: 'Script type',
   targetScope: 'x_snc_example',
   targetType: 'scriptable',
})