OAuth 2.0 Client Credentials works in Postman but not from ServiceNow-to-ServiceNow (401 error)

workpurpose
Kilo Contributor

Hi all,

I’m trying to set up a ServiceNow-to-ServiceNow integration using OAuth 2.0 Client Credentials grant type.

  • On Instance B (target):

    • Created an Application Registry (type = OAuth API endpoint for external clients).

    • Created an OAuth Entity Profile for that registry and mapped it to a sys_user with admin role.

  • On Instance A (caller):

    • I request the token from Instance B’s /oauth_token.do endpoint using client_id and client_secret.

    • The token is returned successfully (access_token).

    • When I test the same token in Postman against Instance B’s /api/now/table/incident, it works fine.

    • But when I call the same endpoint via a RESTMessageV2 script in Instance A, I get:

       
      401 User Not Authenticated Required to provide Auth information
0 REPLIES 0