Required to provide Auth information error in Inbound REST integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2017 08:52 PM
Hi All,
I am trying to do inbound integration to create incident in SN.
I have given the SN end point to external tool and also i have given username and password.
When the external tool is trying to send response to SN, they are getting error message as below.
{ "error": { "detail": "Required to provide Auth information", "message": "User Not Authenticated" }, "status": "failure" }
Can you please help me here on this.
Thanks,
Maddy
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2017 11:23 PM
HI Madan,
Have you selected proper profile and also check if parameters for authentication are proper or not.
Please share screen shot.
Thank you,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2018 01:40 PM
Madan,
I had similar issue, but I resolved with the following code, which inside business rule from instance 1
try {
var user = 'xxxxxx'; <-- valid username with itil role from instance 2
var password = 'bbbbbb';
var request = new sn_ws.RESTMessageV2();
var rBodyInsert = "{\"u_ssss_number\":\""+current.number+"\",\"u_ssss_id\":\""+current.sys_id+"\",\"comments\":\"** SSSS ticket created: "+current.number+"\",\"caller_id\":\"fdc59132db4453009498e9525b96197f\",\"short_description\":\""+current.short_description+"\",\"description\":\""+current.description+"\" }";
request.setEndpoint("https://aaaaaaaaaaaaaaaaaa.service-now.com/api/now/table/incident?sysparm_fields=");
request.setHttpMethod('POST');
request.setBasicAuth(user,password);
request.setRequestHeader("Accept","application/json");
request.setRequestHeader('Content-Type','application/json');
request.setRequestBody(rBodyInsert);
var responseInsert = request.execute();
gs.log("WWWWW2: "+current.number+', -- '+responseInsert.getBody());
}
catch(ex) {
var message = ex.getMessage();
gs.log('WWWWW-Error: '+message);
}
Hope it helps!!
James