Remote Instance Creation Fails with 401 Unauthorized – “Invalid insert”

VasagnanesG
Giga Contributor
Authentication to remote instance failed

 

Check saved username and password
Error Message
Invalid insert 

Remote Instance Creation Fails with 401 Unauthorized – “Invalid insert”

Hi ServiceNow Community,

I am trying to create a Remote Instance connection from one ServiceNow instance to another ServiceNow instance.

While creating the Remote Instance, I am receiving the following error:

Error:

Authentication to remote instance failed

Method failed:
(https://dev405790.service-now.com/sys_properties.do?SOAP&displayvalue=all&redirectSupported=true)
HTTP/1.1 401 Unauthorized with code: 401

Check saved username and password

Error Message:
Invalid insert

Environment

  • Source Instance: ServiceNow instance from which I am creating the Remote Instance

  • Target Instance: dev405790.service-now.com

  • Connection Type: Remote Instance

  • Target endpoint being accessed:
    sys_properties.do?SOAP&displayvalue=all&redirectSupported=true

What I have checked

  1. The target ServiceNow instance is accessible through the browser.

  2. The credentials have been verified.

  3. I can log in to the target instance using the credentials.

  4. I re-entered the username and password while configuring the Remote Instance.

  5. The target instance is active and accessible.

However, the Remote Instance creation still fails with:

HTTP/1.1 401 Unauthorized

followed by:

Invalid insert

Question

What could be causing the 401 Unauthorized response when ServiceNow attempts to access the target instance's sys_properties.do?SOAP endpoint?

Are there any specific requirements for:

  • Remote Instance authentication

  • User roles/permissions on the target instance

  • SOAP/Web Service access

  • Basic Authentication

  • ACLs on sys_properties

  • System properties that need to be enabled

  • Integration user configuration

  • Authentication restrictions or MFA/SSO settings

Could someone please provide the correct configuration steps for creating a Remote Instance connection between two ServiceNow instances and explain what needs to be configured on the target instance?

Any guidance on troubleshooting the 401 Unauthorized and Invalid insert errors would be greatly appreciated.

Thank you.

2 REPLIES 2

Vishal Jaswal
Tera Sage

Hello @VasagnanesG 

Use OAuth

Remote Instance:

Table: sys_properties -- Create New System property "glide.oauth.inbound.client.credential.grant_type.enabled" with type as "true|false" and Value as "false".

 

VishalJaswal_1-1790619167121.png

 


Navigate to All > System OAuth > Inbound Integration > OAuth - Client credentials grant:

VishalJaswal_3-1790619308048.png

 

OAuth Application user as system administrator (this is where you can create a dummy user as well ensuring dummy user must have "snc_platform_rest_api_access" role.)

Select available Auth scope and hit save

VishalJaswal_2-1790620275200.png



 

VishalJaswal_1-1790620232685.png

 


Source Instance:

Navigate to All > System OAuth > Application Registry > New > Connect to an OAuth Provided (simplified) - Outbound:

Enter the Client ID and Client Secret from above Remote Instance
Default Grant Type as Client Credentials
Token URL as remote instance URL: https://remoteinstance.service-now.com/oauth_token.do
VishalJaswal_4-1790619545082.png

 

In Source Instance, Navigate to All > Outbound Rest Message > Create New as Follows and validate

VishalJaswal_6-1790619925040.pngVishalJaswal_7-1790620024823.png

 

 

VishalJaswal_3-1790620361519.png

 




Hope that helps!

Thank you so much for the detailed response and guidance!

It turns out the issue was that I hadn't assigned the admin role to the user. Once I assigned that, everything started working as expected.

Since I am actively working on expanding my ServiceNow knowledge, could you also share some introductory notes or key concepts regarding ITOM (IT Operations Management), CSM (Customer Service Management), and HR Service Delivery? Additionally, if you have any video resources or recordings regarding anything ITSM as well, I would really appreciate any insights or links you could provide.

Thanks again for all your help!

Best regards,
Vasa Gnanesh