Set Current Application Scope
set_current_scopeChanges the active application scope in a ServiceNow instance by setting a new app sys_id, validating the app, recording the previous scope, and verifying the change.
Instructions
Change the active application scope. Validates the app exists, records previous scope, verifies the change. IMPORTANT: This changes the session's application context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| app_sys_id | Yes | The sys_id of the application to set as the current scope. Must be a 32-character hexadecimal string (e.g., "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6") or "global" for the Global scope. |