Change Password for newly created User(Web service access only)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:08 PM
Hello Experts,
Can someone guide me how I can change password for a newly created user with having only web service access role. For other users with access to UI, password can be changed while logging in for the first time but not possible for the user with this specific role.
Also the "Reset a password" related link is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:22 PM
Then one option, mark true, password reset at first login. Login with this user and then you will option to change password and then make a change, esle no other way.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:35 PM
Ya that I am already doing. I created the user with web service access field unchecked, and after resetting the password through first login I changed the field Web service access to checked for the user.
Then there's no other way to reset the password then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:36 PM
No Other way mate.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:38 PM
@Dibyaratnam You can use the following script to set password.
var user = new GlideRecord('sys_user');
user.get('sys_id', '<sys_id of user>');
// Check if user record exists
if (user.isValidRecord()) {
// Set the new password
var newPassword = 'NewPassword123'; //Provide your password here
user.setValue('user_password',newPassword);
user.update();
} else {
gs.error('User record not found.');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2024 12:57 PM
I was expecting this to work but it didn't. In bG script I ran this, and it updates the record as well but when I try to test with credentials, it fails with wrong authentication details message. I disabled the client script which hides the password field and then gave password of my choice. If I use that password it's working but resetting it would be what Atul suggested as a workaround.