Instance A to B Works, but Instance B to A Fails with 401 Unauthorized

dheerajkj
Giga Contributor
Hi Community,
 
I am working on an Incident integration between two ServiceNow instances using REST Messages and a Scripted REST API.
 
Current Status:
 
- Instance A to Instance B is working successfully.
- Incidents are created correctly in Instance B.
- Scripted REST API is active and reachable.
 
Issue:
 
Instance B to Instance A is failing with the following error:
 
HTTP Status: 401 Unauthorized
 
Error Message:
Method failed with code: 401 - Invalid username/password combo
 
Response:
User is not authenticated
Required to provide Auth information
 
What I have checked:
 
- Endpoint URL is correct.
- Authentication is configured in the REST Message.
- Multiple users were tested.
- Newly created users were tested.
- Credentials can be used to log in directly to the target instance.
- The same issue occurs even when other source instances try to call the target instance.
- Instance A to B works, but B to A fails.
 
Questions:
 
1. How can I verify whether the Authorization header is actually being sent from the REST Message?
2. Are there any Scripted REST API authentication settings, ACLs, or roles that could cause this behavior?
3. Has anyone faced a situation where one direction of integration works but the reverse direction consistently returns 401 Unauthorized with "Required to provide Auth information"?
 
Additional Requirement:
 
I also need guidance on:
- Synchronizing attachments on Incident insert and update.
- Synchronizing Additional Comments and Work Notes.
- Returning custom validation messages when mandatory fields are missing.
 
Any suggestions would be appreciated.
 
Thank you.
0 REPLIES 0