Error Reference

OAuth token expired or revoked: re-authentication required

OAuth token expired or revoked: re-authentication required

Where this appears

This error appears in System Logs (System Diagnostics > Log > System Log) when making outbound REST calls or executing Integration Hub spokes that use OAuth 2.0 authentication. The error typically occurs during REST message execution or spoke activities when the stored OAuth access token is no longer valid and cannot be refreshed.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "OAuth token expired or revoked: re-authentication required" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

The OAuth 2.0 access token has reached its expiration time and the refresh token has also expired, requiring complete re-authentication with the external service provider. (high likelihood)

The external service provider has revoked the OAuth application credentials or changed security policies, invalidating existing tokens for your ServiceNow instance. (high likelihood)

The OAuth Entity record in ServiceNow contains incorrect or outdated client credentials (client ID, client secret) that prevent successful token refresh operations. (medium likelihood)

Network connectivity issues or firewall restrictions are preventing ServiceNow from reaching the OAuth provider's token endpoint for refresh operations. (medium likelihood)

The OAuth provider's token endpoint URL has changed or the service is temporarily unavailable, causing refresh attempts to fail and tokens to be marked as invalid. (low likelihood)

Fix

Step 1: Navigate to System Web Services > Outbound > OAuth Entity and locate the OAuth Entity record associated with the failing integration to examine its current token status.

Step 2: Check the System Log at System Diagnostics > Log > System Log for detailed OAuth-related error messages that occurred around the same time as the authentication failure.

Step 3: Verify that the OAuth Entity record contains correct and current client credentials by comparing the Client ID and Client Secret with values provided by the external service provider.

Step 4: Test network connectivity to the OAuth provider's token endpoint by using System Diagnostics > Network > Test Network Connection or checking ECC Queue entries for outbound communication errors.

Step 5: Clear existing tokens by opening the OAuth Entity record and clicking the 'Get OAuth Token' button to initiate a fresh authentication flow with the external provider.

Step 6: Complete the OAuth authorization process in the popup window, ensuring you have appropriate permissions in the external system to grant access to your ServiceNow instance.

Step 7: Test the integration by manually executing the affected REST Message or Integration Hub action to verify that OAuth authentication is now working correctly.

Step 8: Monitor the System Log for the next 24 hours to ensure token refresh operations are successful and no additional authentication errors occur.

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue