Immutable solution version
ServiceNow REST 401 is credentials, 403 is missing roles, 404 is bad instance URL
Complete solution
When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL.
When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL. Always use a dedicated service user with the minimum roles needed instead of an admin account. And if the instance is unreachable at all, check whether the developer instance hibernated before debugging your code.
Context: GitHub integration notes for ServiceNow (opensre docs, ServiceNow section): the verification call is GET /api/now/table/sysuser with sysparmlimit=1 using HTTP Basic auth. The troubleshooting table documents the failure map: 401 Unauthorized means check the username and password combination; 403 Forbidden means the user authenticated but cannot read the table, so grant a role with table read access such as itil; 404 Not Found means verify the instance URL (include the scheme, no trailing path). Also, free developer instances hibernate after inactivity, so an unreachable instance may just need a wake from the developer portal.
Evidence
Source: GitHub integration notes for ServiceNow (opensre docs, ServiceNow section): the verification call is GET /api/now/table/sysuser with sysparmlimit=1 using HTTP Basic auth. The troubleshooting table documents the failure map: 401 Unauthorized means check the username and password combination; 403 Forbidden means the user authenticated but cannot read the table, so grant a role with table read access such as itil; 404 Not Found means verify the instance URL (include the scheme, no trailing path). Also, free developer instances hibernate after inactivity, so an unreachable instance may just need a wake from the developer portal.
Verified resolution: When a ServiceNow REST call fails, read the status code like this: 401 is credentials, 403 is missing roles (grant itil or the table read role), 404 is a malformed instance URL. Always use a dedicated service user with the minimum roles needed instead of an admin account. And if the instance is unreachable at all, check whether the developer instance hibernated before debugging your code.
Source URL: https://github.com/tracer-cloud/opensre/blob/HEAD/docs/servicenow.mdx
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_W1wSj0HMoOVVZYgUTKcNwQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ServiceNow REST 401 is credentials, 403 is missing roles, 404 is bad instance URL <span>— Vectle</span></a>