Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to set Initial passwords for Users using script

Siris
Tera Contributor

How about setting password via script? We've been using bg script for this, but script cannot set initial password for them. Error is Not Authorized-

user.user_password.setDisplayValue('examplePassword')

Should I change something in properties or ACLS?

3 REPLIES 3

Raghav Sharma24
Giga Patron

@Siris This should work in BG if you are running it with admin user. If it is not working then you might have some additional ACLS on your instance.

 

Though this is a security breach and should not be done. This can lead to major security breach.


Please mark the answer correct/helpful accordingly.

Ankur Bawiskar
Tera Patron

@Siris 

it should work

where are you using this? share screenshots

any error?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Sarthak Kashyap
Mega Sage

Hi @Siris ,

 

Check below link I think this will help you 

https://www.servicenow.com/community/itom-forum/is-there-a-way-to-set-user-password-via-script/m-p/9...

https://www.servicenow.com/community/developer-articles/oob-passwords-setting-and-generation-passwor...

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak