Skip to Content

ServiceNow

The ServiceNow enables tools and to call ServiceNow APIs on behalf of a .

What’s documented here

This page describes how to use and configure ServiceNow auth with Arcade.

This is used by:

  • The Arcade ServiceNow MCP Server, which provides pre-built for incidents, changes, catalog requests, knowledge articles, and the CMDB
  • Your app code that needs to call ServiceNow APIs
  • Or, your custom tools that need to call ServiceNow APIs

Arcade does not offer a default ServiceNow . To use ServiceNow auth, you must create a custom provider configuration as described below. You create the OAuth client in your ServiceNow instance, then register it in Arcade as an OAuth 2.0 provider with the ID servicenow.

The provider is scoped to an Arcade . Confirm you’re in the project you intend to test against before you start, with arcade project set your-project-id. A provider created in the wrong project is invisible to everything else.

Create a ServiceNow OAuth app

Creating the OAuth client requires the oauth_admin, mi_admin, or admin role on the instance. Zurich and later register OAuth clients through Machine Identity Console. Earlier releases use Application Registry.

Create the inbound integration

Navigate to System OAuth > Machine Identity Console > Inbound integrations > New integration, then choose OAuth - Authorization code grant.

Name the integration

Give it a name that identifies the client, for example Arcade. Create one integration per external client rather than reusing an existing one.

Leave “This is a public client” unchecked

Arcade is a confidential client and authenticates with a client secret, so this option stays off.

Copy the client ID and secret

ServiceNow generates the Client ID and Client secret on this screen. Copy both now. The secret may only be displayed once.

Leave Redirect URLs blank for now

You’ll fill this in after Arcade generates the redirect URL.

Select the useraccount auth scope

Under Auth scope, select useraccount. This is the scope that preserves the caller’s own ACLs, which is what makes the toolkit’s fulfiller and requestor access model behave correctly.

Two things happen when you select it, and both are expected:

  • The restrict to selected APIs checkbox disables itself, showing “scope already grants access to all signed-in resources”. Leave it alone.
  • A yellow banner warns you to “assign only non-sensitive API scopes”. This is ServiceNow’s generic nag for any useraccount-scoped integration, not an error. Don’t narrow the scope to make it go away.

Once saved, the record title shows a Useraccount scoped badge confirming the scope took effect.

Save the integration

Leave Active checked and save.

Get your ServiceNow instance URL

Your instance URL is the host your instance’s REST APIs are served from, in the form https://your-instance.service-now.com. For example, if your instance is acme-inc, your instance URL is https://acme-inc.service-now.com.

Every ServiceNow REST API is served from the service-now.com host, even on an instance whose browser UI uses a custom vanity domain. Use the service-now.com host here rather than the vanity domain.

Set the ServiceNow instance URL secret

Set the SERVICENOW_INSTANCE_URL secret in the Arcade Dashboard:

  • Click the Secrets section in the Arcade Dashboard left-side menu.
  • Click the Add Secret button.
  • Enter SERVICENOW_INSTANCE_URL as the secret ID.
  • Enter your instance URL as the secret value.
  • Click the Create button.

The value accepts a bare instance name (acme-inc), a host (acme-inc.service-now.com), or a full URL (https://acme-inc.service-now.com). Arcade normalizes all three to the same origin.

Configuring ServiceNow auth

Configure ServiceNow auth using the Arcade Dashboard GUI

Access the Arcade Dashboard

Go to the Arcade Dashboard  and log in with your Arcade credentials.

  • Under the Connections section of the Arcade Dashboard left-side menu, click Connected Apps.
  • Click Add OAuth Provider in the top right corner.
  • Select the OAuth 2.0 tab at the top.

Enter the provider details

  • Enter servicenow as the ID for your provider. The ID must be servicenow for the Arcade ServiceNow MCP Server to resolve it.
  • Optionally enter a Description.
  • Enter the Client ID and Client Secret you copied from ServiceNow.

Configure the auth endpoints

ServiceNow doesn’t publish OpenID Connect discovery metadata for these clients, so set the endpoints explicitly. Replace your-instance with your own instance name.

  • Authorization URL: https://your-instance.service-now.com/oauth_auth.do
  • Token URL: https://your-instance.service-now.com/oauth_token.do

Create the provider

Click the Create button. Arcade generates a Redirect URL for the provider. Copy it.

Add the redirect URL to your ServiceNow integration

Go back to the ServiceNow integration record you created earlier, paste the redirect URL Arcade generated into Redirect URLs, and save.

If authorization fails with a redirect mismatch immediately after saving the redirect URL, allow a few minutes for ServiceNow to propagate the change before troubleshooting further.

Using the Arcade ServiceNow MCP server

The Arcade ServiceNow MCP Server provides to search and update work records, order catalog items, read knowledge articles, and explore the CMDB.

Every call runs as the authorizing ServiceNow user and honors that user’s roles and ACLs, so a returns only what that could see or change in the ServiceNow UI.

Check our introductory documentation to understand what are and how tool calling works.

Calling ServiceNow APIs directly

Use the ServiceNow to get a user authorization token and call ServiceNow API endpoints directly, without the use of any . See How Arcade helps with Agent Authorization to understand how this works.

Prerequisites

  1. Create an Arcade
  2. Get an Arcade API key.
  3. Set the ARCADE_API_KEY environment variable (export ARCADE_API_KEY=your-api-key on Bash, $env:ARCADE_API_KEY="your-api-key" on PowerShell).
  4. Make sure to have Python 3.10+ or Node.js 18+ installed.
Python
import requests from arcadepy import Arcade client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable user_id = "[email protected]" instance_url = "https://acme-inc.service-now.com" auth_response = client.auth.start( user_id=user_id, provider="servicenow", scopes=["useraccount"], ) if auth_response.status != "completed": print("Click this link to authorize: " + auth_response.url) auth_response = client.auth.wait_for_completion(auth_response) token = auth_response.context.token response = requests.get( instance_url + "/api/now/table/incident", headers={"Authorization": "Bearer " + token}, params={"sysparm_limit": 5, "sysparm_query": "active=true"}, ) print(response.json())

Using ServiceNow auth in custom tools

If the Arcade ServiceNow MCP Server does not meet your needs, you can author your own custom tools that interact with ServiceNow APIs.

Use the OAuth2() auth class to specify that a requires authorization with ServiceNow. The id must match the ID of the provider you created, and context.get_auth_token_or_empty() returns the ’s ServiceNow token:

Python
from typing import Annotated, Any import httpx from arcade_mcp_server import Context, tool from arcade_mcp_server.auth import OAuth2 @tool( requires_auth=OAuth2(id="servicenow", scopes=["useraccount"]), requires_secrets=["SERVICENOW_INSTANCE_URL"], ) async def get_active_incidents( context: Context, ) -> Annotated[dict[str, Any], "Active incidents from ServiceNow"]: """Get active incidents from ServiceNow.""" token = context.get_auth_token_or_empty() instance = context.get_secret("SERVICENOW_INSTANCE_URL") url = f"https://{instance}.service-now.com/api/now/table/incident" headers = { "Authorization": f"Bearer {token}", "Accept": "application/json", } params = {"sysparm_query": "active=true", "sysparm_limit": 10} async with httpx.AsyncClient() as client: resp = await client.get(url, headers=headers, params=params) resp.raise_for_status() return {"incidents": resp.json().get("result", [])}

Every call runs under the authorizing user’s own roles and ACLs, so a custom sees exactly what that would see in the ServiceNow UI. Handle an empty result as a permissions outcome rather than an error.

Troubleshooting

  • The provider doesn’t show up for your : it was created in a different Arcade . The provider is project-scoped. Confirm the active project with arcade project set your-project-id and check the provider exists there.
  • Authorization succeeds but every call returns 403: the authorizing lacks the roles needed for the table the tool reads or writes. Re-authorize as a user with broader access, or adjust the ACLs on the target table.
  • report that the instance URL is not configured: the SERVICENOW_INSTANCE_URL secret is missing, or set in a different than the one running the tools.
  • Redirect mismatch errors: the redirect URL on the ServiceNow integration doesn’t match the one Arcade generated. Copy it again from the provider in the Arcade Dashboard.
  • A setting change doesn’t seem to take effect: existing tokens don’t retroactively pick up changes to the OAuth integration. Revoke the existing grant for the affected and re-authorize to get a fresh token.

Next steps

Last updated on