- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 05:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2016 08:29 PM
Sunny,
var gr = new GlideRecord('sys_user');
//The below query will reset the password for all users whose date of password is dated more than 20 days before.Change accordingly.
gr.addQuery('u_date_of_password','<','gs.daysAgo(-20))');
gr.query();
while (gr.next())
{
gr.password_needs_reset = true;
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2016 03:23 PM
Hi Sunny,
As noted earlier, you can do this without any scripting if you use the update set I created.
When ever there is a scriptless solution and a scripted solution - take the scriptless approach. It's easier to create and maintain (for you and for others.)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 08:47 PM
Here's how I would approach it.
- Create a date field on the user table (sys_user) to track when the last time they changed their password.
- Hint: use a business rule that triggers on change of the password field then updates this date field.
- Use my Scriptless Scheduled Jobs update set to filter on records where that date is > 30 days ago (and the password needs reset field is false), then set the Password needs reset field to true.
Pretty quick and easy. Next time the person logs in, they get prompted to change their password and the date resets. If they choose to reset their password before the expiration, same thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2016 02:06 AM
Orthogonal to this discussion, but... is there anywhere a password policy can be set (expiry, warning, min/max age, lockout threshold, etc)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2020 05:28 AM
Thank you alot .. your comments is to the point 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2020 06:54 AM
As a followup, the Scriptless scheduled jobs add-on was a stop-gap measure before we got Flow Designer. When it comes to making easy-to-manage scheduled jobs, please look at Flow Designer first!