Scheduled Import Passwords
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 12:55 PM
Hello community.
We have a scheduled data imports that pull data from the ServiceNow APIs (particularly to synch up some production data with our lower environments without having to do a clone). We need to change the username/password associated in the data source related to the scheduled imports (sys_data_source). We update a data source to the new username and password and get an unauthorized error message when testing the import. A sample error message we get is:
com.glide.db.impex.datasource.DataSourceException: java.io.IOException: Method failed: (https://***:***@digitalriver.service-now.com/customer_contact_list.do?XML&sysparm_query=active%253Dt...) HTTP/1.1 401 Unauthorized with code: 401
We have tried the following:
Entering the password manually (instead of copy/paste).
Use the browser's private/incognito mode.
Browsers tried are Chrome and Edge.
Since the data source retrieves the data using HTTPS, I copied the connection URL, added in the password to the URL and it worked just fine. It also doesn't work using any other valid usernames.
The only thing I can see is the password field for the data source is a password2 data type and the password in the users table is a password data type. Would that affect things?
We are perplexed. Any ideas what we are doing wrong?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 01:45 PM
Hi, you don't make it clear where you are sourcing the passwords, but if it is from password field in ServiceNow then the visible password would need to be decrypted.
syntax to decrypt Password2 field
var password = current.<password2_field_name>.getDecryptedValue();
Note this only works with Password2 type fields and Password1 type (IE sys_user password) are not decryptable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 12:06 PM
Hi Tony.
Thanks for your response.
We tried the password decryption through Xplore and were able to get the correct/expected result. We encounter this when we click the 'Test Load 20 Records' related link (or 'Load All Records' link).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 09:23 AM - edited 03-08-2023 05:51 AM
This seems like something that would warrant a HI ticket as it sounds like it was working previously but then stopped working when you tried to update the password. But first make sure "Reset needs password" is unchecked on the remote user.
Did you have any luck resolving the issue?