Bookmarklet for mass adding users to field type in particular ServiceNow forms. If you're not sure if this will work for you, then it probably won't.
The aim is just to make it less painful for adding long lists of users in forms. Usually you need to do it one at a time, by typing or pasting in the user's name.
Paste the contents of bookmarklet.txt into a bookmark, and open/run the bookmark when on the relevant ServiceNow form.
You will be asked for the name of the field to update and a list of users.
Provide part of the label of the field that is specific enough to match a single label. It'll tell you if it finds more than one.
The list of users should be comma separated Firstname Lastname users, like John Doe,Jane Smith,....
On submit, each user will be looked up with a network call and their chips should show in the field as if you'd added them one by one. If you see the chips, it's going to work. Anything else means it's not quite working on your form/field. It has only been tested on a form called Manage Azure AD group.
main.js is the source. You can paste this into a dev console while on a form page in ServiceNow.
Manually running testMain() will open an input prompt, while running testBookmarklet() will compile the bookmarklet URL and run that to test it in bookmarklet form.
makeBookmarklet() can be run in the console to generate a new bookmarklet URL. That should be committed to this repo for convenience.