---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Role API

# Role API - ServiceNow Fluent {#ariaid-title1}

* Release version: Yokohama
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The Role API defines roles \[sys_user_role\] that grant specific permissions to users of an application.
Note:  
For the latest ServiceNow Fluent API documentation and examples, see the [ServiceNow Fluent API reference](https://servicenow.github.io/sdk/) and [ServiceNow SDK examples repository](https://github.com/ServiceNow/sdk-examples) on GitHub.

For general information about user roles, see [Managing roles](https://www.servicenow.com/docs/access?context=ua-creating-roles&version=yokohama&pubname=yokohama-platform-administration&ft:locale=en-US).
**Related concepts**   

* [ServiceNow Fluent](https://servicenow-prod.fluidtopics.net/~uRaWXiuRJuyUsvJypBknQ "Define application metadata in source code using the ServiceNow Fluent domain-specific programming language.")

## Role object {#ariaid-title2}

Create a role \[sys_user_role\] to control access to applications and their features.
{#role-object-now-ts__table_vy2_525_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | A name for the role beginning with the application scope in the following format: <kbd class="ph userinput">&lt;scope&gt;.&lt;name&gt;</kbd>. |
| assignableBy | String | Other roles that can assign this role to users. |
| canDelegate | Boolean | Flag that indicates if the role can be delegated to other users. For more information, see [Delegating roles](https://www.servicenow.com/docs/access?context=c_DelegateRoles&version=yokohama&pubname=yokohama-platform-administration&ft:locale=en-US). Valid values: * true: The role can be delegated to other users. * false: The role can't be delegated to other users. {#role-object-now-ts__ul_fjr_cc5_pbc} Default: true |
| description | String | A description of what the role can access. |
| elevatedPrivilege | Boolean | Flag that indicates whether manually accepting the responsibility of using the role before you can access the features of the role is required. For more information about elevated privileges, see [Elevated privilege roles](https://www.servicenow.com/docs/access?context=c_ElevatedPrivilege&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US). Valid values: * true: You must manually accept the responsibility of using the role before you can access its features. * false: You don't need to manually accept the responsibility of using the role to access its features. {#role-object-now-ts__ul_ukv_qd5_pbc} Default: false |
| grantable | Boolean | Flag that indicates whether the role can be granted independently. Valid values: * true: The role can be granted independently. * false: The role can't be granted independently. {#role-object-now-ts__ul_gb2_zd5_pbc} Default: true |
| containsRoles | Array | The variable identifiers of other Role objects that this role contains. |
| scopedAdmin | Boolean | Flag that indicates whether the role is an Application Administrator role. For general information about application administration roles, see [Application administration](https://servicenow-prod.fluidtopics.net/YCqzuzo_Bgm1kBof4bhr8Q "Protect sensitive application data by using application administration to restrict how users acquire application-specific roles."). Valid values: * true: The role is an Application Administrator. * false: The role isn't an Application Administrator. {#role-object-now-ts__ul_nxt_325_pbc} Default: false |
| $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. $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. {#role-object-now-ts__ul_n3q_y3s_42c} |
[Table 1. Properties]

{#role-object-now-ts__table_vy2_525_jq}  

    import { Role } from "@servicenow/sdk/core";

    const managerRole = Role({ 
       $id: Now.ID['manager_role'], 
       name: 'x_snc_example.manager' 
    })

    const adminRole = Role({ 
       $id: Now.ID['admin_role'], 
       name: 'x_snc_example.admin', 
       containsRoles: [managerRole] 
    })


