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
CrossScopePrivilege object
Configure cross-scope privileges [sys_scope_privilege] that determine which script operations and targets the system allows to run in the application.
|
Name |
Type |
Description |
|---|---|---|
|
$id |
String or Number |
Required. 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: |
|
status |
String |
Required. The authorization for this record.Valid values:
|
|
operation |
String |
Required. 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:
|
|
targetName |
String |
Required. The name of the table, script include, or script object being requested. |
|
targetScope |
String |
Required. The application scope from which resources are requested. |
|
targetType |
String |
Required. The type of request: script include, script object, or table.Valid values:
|
|
$meta |
Object |
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. JavaScript Valid values for installMethod:
|
CrossScopePrivilege({ $id: Now.ID['cross_1'], status: 'allowed', operation: 'execute', targetName: 'Script type', targetScope: 'x_snc_example', targetType: 'scriptable', })
---
title: Cross-Scope Privilege API - ServiceNow Fluent
description: The Cross-Scope Privilege API defines cross-scope privileges \[sys\_scope\_privilege\] for runtime access tracking.Configure cross-scope privileges \[sys\_scope\_privilege\] that determine which script operations and targets the system allows to run in the application.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/application-development/servicenow-sdk/cs-privileges-api-now-ts.html
release: brazil
product: ServiceNow SDK
classification: servicenow-sdk
topic_type: reference
last_updated: "2026-09-10"
reading_time_minutes: 2
breadcrumb: [ServiceNow Fluent API reference, Reference, ServiceNow SDK, Building applications in source code, Building pro-code applications, Developing your application, Classic app development, Building applications]
---
# 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](https://servicenow.github.io/sdk/category/api-reference) and [ServiceNow SDK examples repository](https://github.com/ServiceNow/sdk-examples) 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/c_CrossScopePrivilegeRecord.md).
**Parent Topic:**[ServiceNow Fluent API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/servicenow-sdk/servicenow-fluent-api-reference.md)
**Related topics**
[ServiceNow Fluent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/servicenow-fluent.md)
## CrossScopePrivilege object
Configure cross-scope privileges \[sys\_scope\_privilege\] that determine which script operations and targets the system allows to run in the application.
<table id="table_vy2_525_jq" class="parameters"><thead><tr><th>
Name
</th><th>
Type
</th><th>
Description
</th></tr></thead><tbody><tr><td>
$id
</td><td>
String or Number
</td><td>
Required. 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`
</td></tr><tr><td>
status
</td><td>
String
</td><td>
Required. The authorization for this record.Valid values:
- requested
- allowed
- denied
</td></tr><tr><td>
operation
</td><td>
String
</td><td>
Required. 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
</td></tr><tr><td>
targetName
</td><td>
String
</td><td>
Required. The name of the table, script include, or script object being requested.
</td></tr><tr><td>
targetScope
</td><td>
String
</td><td>
Required. The application scope from which resources are requested.
</td></tr><tr><td>
targetType
</td><td>
String
</td><td>
Required. The type of request: script include, script object, or table.Valid values:
- sys\_script\_include
- scriptable
- sys\_db\_object
</td></tr><tr><td>
$meta
</td><td>
Object
</td><td>
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.
```javascript
$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.
</td></tr></tbody>
</table>```javascript
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',
})
```
| title | Cross-Scope Privilege API - ServiceNow Fluent |
| description | The Cross-Scope Privilege API defines cross-scope privileges \[sys\_scope\_privilege\] for runtime access tracking.Configure cross-scope privileges \[sys\_scope\_privilege\] that determine which script operations and targets the system allows to run in the application. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/application-development/servicenow-sdk/cs-privileges-api-now-ts.html |
| release | brazil |
| product | ServiceNow SDK |
| classification | servicenow-sdk |
| topic_type | reference |
| last_updated | 2026-09-10 |
| reading_time_minutes | 2 |
| breadcrumb | ServiceNow Fluent API referenceReferenceServiceNow SDKBuilding applications in source codeBuilding pro-code applicationsDeveloping your applicationClassic app developmentBuilding applications |