---
sourceDocument: Yokohama Enable AI
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/intelligent-experiences

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Role masking

# Role masking in Now Assist AI agents {#ariaid-title1}

Release version: Yokohama  
Updated November 4, 2025  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Role masking in Now Assist AI agents

Role masking in Now Assist AI agents enhances security by limiting the permissions AI agents and agentic workflows inherit when running as dynamic users.
It enforces least-privilege access by restricting execution to only those roles approved and assigned to the invoking user, preventing AI components from accessing unauthorized resources or data.
This capability is configured by AI admins within AI Agent Studio and applies to agentic workflows, AI agents, and skills that execute on behalf of users.
Show full answer Show less  

## Key Features

* **Role Limitation:** Role masking restricts AI agents and workflows to the intersection of roles assigned to the invoking user and an approved roles allow-list defined by admins.
* **Dynamic vs AI User Execution:** Role masking applies only when AI agents or workflows run as dynamic users; it does not apply to those running as AI users, which have full assigned roles.
* **Layered Role Masking:** Multiple role masks can be applied sequentially across agentic workflows, AI agents, and tools, each further restricting permissible roles.
* **ACL and Role Mask Evaluation:** Access Control Lists (ACLs) and role masks are systematically validated at each execution layer---workflow, AI agent, and tool---ensuring components operate with minimum necessary privileges.
* **Security Governance:** Role masking prevents overreach by AI solutions into sensitive data or functions, enabling better governance and reducing security risks.

## Prerequisites

* Now Assist for Platform version 10.0.2-SS or later.
* snaia.admin privileges to configure role masking.

## Role Masking Behavior and Rules

Role masking enforces that AI components inherit only roles common to both the invoking user and the approved roles list. It never grants additional roles beyond those of the user. Tools always run as dynamic users and abide by role masking rules. When workflows run as AI users and invoke dynamic user agents with role masking, roles are further intersected with those assigned to the AI user. This layered approach guarantees strict least-privilege enforcement throughout AI-driven processes.

## ACL and Role Mask Evaluation Sequence

The security checks occur in the following order:

1. **Agentic Workflow ACLs:** Validated against the invoking user's roles.
2. **Agentic Workflow Role Masking:** Applied to restrict the invoking user's roles as per the approved list.
3. **AI Agent ACLs:** Validated against roles approved for the workflow (AI user roles or post-masking roles).
4. **AI Agent Role Masking:** Further restricts roles if dynamic user with role masking is configured.
5. **Tool ACLs:** Validated against AI agent's permitted roles.
6. **Tool Role Masking:** Applied for skills to limit roles further during tool execution.

This evaluation ensures all AI components comply with defined security policies and role constraints, with clear diagnostics available for failures due to ACL or role mask restrictions.

## Configuration

To set up role masking, admins use AI Agent Studio to define security controls for AI agents and agentic workflows. Specific configuration guides are provided for each component type, enabling precise control over role inheritance and enforcement.  
Role masking for AI agents and agentic workflows running as dynamic users enhances security by enabling users to limit the roles with which AI agents and agentic workflows execute, verifying that AI agents run with minimum
necessary privileges.

## Role masking overview {#aia-role-masking__section_kp4_lrs_fhc}

Role masking lets AI admins in the AI Agent Studio to limit permissions of agentic workflows or AI agents set tom run as dynamic users by defining an allow-list of roles they can inherit from invoking users, enforcing least-privilege
access.  
Use role masking to:

* Empower users to follow least-access principles when an agentic workflow or AI agent executes on behalf of a dynamic user.
* Limit roles that agentic workflows, AI agents, and skills inherit from users and can be applied when a user invokes them.For more information about configuring skills, see [AI Skill Kit](https://servicenow-prod.fluidtopics.net/dxWc7_6kndyvOpbI~VgDhA "Use ServiceNow AI Skill Kit to create and publish custom prompts and skills for Now Assist. Creating custom skills and prompts enables you to have greater flexibility with Now Assist's generative AI capabilities.").

* Reduce the risk of AI solutions accessing the resources that they shouldn't, therefore helping prevent agentic overreach into sensitive data or capabilities beyond what the user is allowed.
* Expand the security configurations to increase functionality of agentic products while reducing security risks by enforcing governance for elevated or scoped roles.
{#aia-role-masking__ul_my1_1z1_fhc}

## Prerequisites {#aia-role-masking__section_arn_vml_ghc}

To configure role masking on your ServiceNow instance, you must have:

* Now Assist for Platform version 10.0.2-SS.
* The sn_aia.admin privileges.
{#aia-role-masking__ul_gm3_zml_ghc}

## Role masking behavior {#aia-role-masking__section_ijq_rnl_ghc}

Role masking behavior in agentic workflows, AI agents, and tools controls which of the invoking user's roles are available to AI agents and tools during workflow execution. The roles are applied sequentially across layers in
the agentic workflow, AI agent, and Tool sequence to verify that tools execute with minimum required privileges.

## Role masking rules {#aia-role-masking__section_cmw_b4l_ghc}

1. Role masking limits the roles with which an agentic workflow, AI agent or Skill can execute to the intersection between the roles assigned to the invoking user and the riles included in the role masking approved roles list.
2. AI user vs Role mask:The AI admin can choose for the component to run as either an AI user or a dynamic user. If set to run as a dynamic user, the AI admin can configure role masking for the component. Role
   masking cannot be configured for agentic workflows or AI agents set to run as AI users.

   * If an AI user is selected, all roles assigned to the AI user are available to the agentic workflow or AI agent. This can be used to provide elevated access to the agentic workflow AI agent.  
     Note:  
     Tools always run as dynamic users.
   * If Role masking is applied to an agentic workflow, AI agent, or tool running as a dynamic user, the component runs with roles with roles limited to the intersection of the current invoking user's roles and the roles included in the role masking approved roles list.
   {#aia-role-masking__ul_qgr_bql_ghc}
3. Multiple role masks can be configured and applied in the agentic workflow - AI agent - tool sequence, but each mask still follows the intersection rule.
4. Role masking only restricts roles that components can execute with, but never grants components roles which exceed those of the invoking user. Thus, if the invoking user has a role that is not included in the approved roles list, the component will not be allowed to execute with that role. And, if the approved roles list includes a role that is not assigned to the invoking user, the component will not be able to execute with that role again.
5. When a workflow running as an AI user invokes an AI agent running as a dynamic user with role masking configured, then the roles available to the AI agent will be the intersection of the role masking configuration of the AI agent and the roles assigned to the AI user of the agentic workflow. The same holds true for an AI agent running as an AI user that then invokes a skill with role masking configured.
{#aia-role-masking__ol_z3m_qpl_ghc}

## ACL and role masking evaluation sequence {#aia-role-masking__section_drn_wql_ghc}

The following sequence defines how ACLs and role masks are evaluated across the agentic workflow, AI agent, and tool execution contexts:

Step 1: Agentic workflow ACL validation
:   ACLs configured for workflows are evaluated against the invoking user (automated or conversational) session roles.

Step 2: Agentic workflow role mask application
:   If the invoking user meets the agentic workflow's ACL criteria (and the agentic workflow is set to run as a dynamic user with role masking configured), the agentic workflow role masking is applied to the invoking
    user's roles (there by restricting roles from the user session based on the intersection with the configured role masking).

Step 3: AI agent ACL validation
:   When an agentic workflow invokes an AI agent, the AI agents' ACLs are validated against one AI agent ACLs are validated against one of the roles with which the agentic workflow was approved to execute. Thus:

    * If the agentic workflow was set to run as an AI user, the AI agent ACL will validate against the AI user session configured at the workflow.
    * If the agentic workflow was set to run as a dynamic user with role masking, the AI agent ACL will check whether the effective remaining roles after applying the workflow role masking meets the ACL criteria.
    {#aia-role-masking__ul_wjv_krl_ghc}

Step 4: AI agent role masking application
:   Similar to the agentic workflow above, either the AI user or the AI agent role mask is applied:

    * If an AI user is selected, all roles of the AI user are enforced (no masking).
    * If role mask is applied, then the roles are limited further based on intersection with the effective roles after applying the workflow role masking.
    {#aia-role-masking__ul_n32_qrl_ghc}

Step 5: Tool ACL validation
:   If a tool uses ACLs, these are checked against the roles that the AI agent---assigned to the tool---is permitted to use. This means that if role masking is set up, only the roles left after masking are considered
    during validation.

Step 6: Tool role masking application
: If the tool is a skill and has role mask configured, then the approved roles will be applied to roles with which the AI agent was approved to run, thereby limiting roles for the tool's execution.  
Summary of ACL and role masking evaluation order:

1. Agentic workflow ACLs → validated with invoking (conversational or automated) user session's roles.
2. Agentic workflow role masking → applied to the invoking user session.
3. AI agent ACLs → validated with agentic workflow's approved roles (agentic workflow's AI user OR roles after workflow role masking).
4. AI agent role masking → applied to agentic workflow's approved roles.
5. Tool ACLs → validated with AI agent's approved roles (AI agent's AI user or roles after agent role masking).
6. Tool role mask (Skills only) → applied to AI agent's approved roles.

{#aia-role-masking__ol_zqw_j5m_ghc}  
Note:  
When evaluating ACLs and role masks, the admin can identify where and why execution failed due to either ACL or role mask restrictions.

## Configuration {#aia-role-masking__section_q4y_rh2_ghc}

* To configure role masking for an AI agent, see [Define security controls for an AI agent](https://servicenow-prod.fluidtopics.net/fNGvztRlJFgsWTIZCIhbIw "In the guided setup for an AI agent, define security controls for who can access the AI agent and what data the AI agent has access to.").
* To configure role masking for an AI agent, see [Define security controls for an agentic workflow](https://servicenow-prod.fluidtopics.net/BxlfGCh0M5stfHIyBZXlnw "In the guided setup for an agentic workflow, define security controls for who can access the agentic workflow and what data the agentic workflow has access to.").
{#aia-role-masking__ul_h3q_4nl_ghc}

