test_agent_access
Checks whether a user can access an AI agent, agentic workflow, or Now Assist skill and explains the verdict from active status, ACL roles, and data-access settings.
Instructions
Answer "can this user use this AI agent, agentic workflow or Now Assist skill?" with the reasons. Works it out from the instance data: whether the asset is active, its execute ACLs (types gen_ai_agent, gen_ai_workflow, gen_ai_skill, falling back to the type's wildcard rule), the roles on those ACLs, the skill role filter (in_product_roles) and the user's active roles. Also reports data access: run-as user and role masking (sys_agent_access_role_configuration). ACL conditions, scripts and custom security attributes are reported as not evaluated, and the verdict is then undetermined. This models the platform check. It is not ServiceNow's own "Test access" (AI Agent Studio, Brazil) or Access Analyzer, which have no documented REST API.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user": "<user>",
"target": "<target>"
},
"name": "test_agent_access"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | User sys_id, user_name or email | |
| target | Yes | sys_id or name of the agent, workflow or skill | |
| target_type | No | agent (AI agent), workflow (agentic workflow / use case) or skill (Now Assist skill). Default agent. |