Getting { message: "User Not Authenticated", detail: "Required to provide Auth information"} While calling ServiceNow Rest Api from Angular Application It Works Fine on POSTMAN but somehow not on Angular
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-17-2020 08:03 AM
Getting { message: "User Not Authenticated", detail: "Required to provide Auth information"} While calling ServiceNow Rest Api from Angular Application It Works Fine on POSTMAN but somehow not on Angular
requestheaders.append('Accept','application/json');
requestheaders.append('Content-Type', 'application/json');
requestheaders.append('X-UserToken', 'TOKEN');
url = this.link +"/api/now/table/kb_knowledge?sysparm_limit=1";
var authorizationHeader = 'Basic ' + btoa('<UserName>:<Password>');
requestheaders.append('Authorization', authorizationHeader);
this.httpClient.get<IlistDataResponse>(this.url,{headers:requestheaders}).subscribe((data)=> {
console.log(data.result);
},
err => {
console.log(err );
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-09-2020 03:02 PM
I'm having the same problem, but I'm making the call from an Azure DevOps Pipeline and am using bash to generate the base64 authorization header. I feel like there has got to be some header involved that the REST API Explorer in SN is not telling us about. Have you checked Postman to validate all of the headers it is sending?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-01-2021 09:25 AM
Hi Sandip,
Is this issue resolved for you? We are also seeing the same issue, Any servicenow API link opening in Chrome is throwing the same xml error.
Kindly share how this is fixed for you?
Thanks,
Nandana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-08-2021 03:46 PM
was it resolved ? I do have same issue and unable to find solution for it
The same curl command works from my local mac but not from azure devops pipelines ( bash/powershell/python) tasks. very strange
