How to disable a user if the last login time is greater than 90 days

Raghesh
Giga Expert

Hi,

We have a requirement to disable or deactivate the users in ServiceNow if their last login time is greater that 90 days.

Is this something which we can do with a script?.

regards,

Raghesh

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can simply do this using flow designer with no script

Flow runs daily and check if any user has last login time greater than 90 days

Then iterate all those user records and update the record

Regards
Ankur

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

Hi,

like this

Remember to save and Activate the flow

find_real_file.png

find_real_file.png

 

find_real_file.png

Regards
Ankur

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

@Raghesh 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

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

Your condition with last login time is not working