Set Current Application Scope
set_current_scopeSet the current application scope for a ServiceNow session. Validates the app exists and confirms the change, ensuring scripts and queries run in the intended context.
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. |