- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 08:18 AM
Hi,
While doing rest call and providing basic authorization, I am getting an invalid username and password combination. I trying to do sailpoint integration and to test whether all the content json and headers work correctly, I used google chrome postman to send the values as Rest and it worked like a charm. But when using ServiceNow, it throws me an error with invalid user name password combination.
I tried to debug further by adding logs to the BasicAuth Script Include and it shows me that the username password it is authorizing is the one configured for MidServer. Though I have not selected the mid server in my rest message it still is using the midserver user name password. Is there a way to make a direct Rest call without using the mid server?
Thanks,
Venkat
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 11:12 AM
Hi Venkat,
This has been recognized as an issue and will be addressed. The workaround is to manually create an "Authorization" header with a value of "BASIC ****". The * value is equal to the base64 encoding of the credentials, username:password.
Here is some sample code to arrive at the encoded credentials.
var username = "my_username";
var password = "my_password";
encodedAuth = GlideStringUtil.base64Encode(username + ':' + password);
gs.print("BASIC " +encodedAuth);
Result -
BASIC bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ=
I hope this helps address your concerns.
Regards,
Julio Fernandez
ServiceNow Integrations Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 01:29 PM
Were you able resolve your issue, We are having the exact same issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2018 06:29 AM
Hi,
We are facing the same issue when calling the import set table in Servicenow from outside while integrating to SAP, anybody was able to resolve this error.
401 user authetication.
<?xml version="1.0" encoding="UTF-8"?>
<response>
<error>
<detail>Required to provide Auth information</detail>
<message>User Not Authenticated</message>
</error>
<status>failure</status>
</response>
Regards,
Raushan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 09:08 AM
Solved the issue in flow designer rest step by using 'Basic' instead of 'BASIC', 'BASIC' was causing the 401 error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 07:57 AM
Hi Julio,
Could you please confirm if this issue has been resolved as we are still experiencing the same issue while trying to connect to a third party application using the REST Post method?
If it's not yet resolved, where should I use the above code as a workaround?
Thanks,
Rohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 09:08 AM
Solved the issue in flow designer rest step by using 'Basic' instead of 'BASIC', 'BASIC' was causing the 401 error