Skip to content

Commit f18fdf8

Browse files
authored
Disable Service accounts due to inactivity
This code helps to disable the service account due to inactivity for last 30 days.
1 parent a5e4740 commit f18fdf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Server-Side Components/Scheduled Jobs/Auto Disable account/Disable Service accounts due to inactivity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var user = new GlideRecord("sys_user");
22
user.addActiveQuery();
3-
user.addEncodedQuery("last_login!=NULL");
3+
user.addEncodedQuery("last_loginISNOTEMPTY^u_service_account=true");
44
user.query();
55
while (user.next()) {
66
var arr = [];

0 commit comments

Comments
 (0)