Skip to content

Commit 537839e

Browse files
README.md
1 parent 957d24c commit 537839e

File tree

1 file changed

+4
-0
lines changed
  • Server-Side Components/Background Scripts/User with no roles and groups

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This script identifies active users in ServiceNow who have no group memberships and no roles assigned.
2+
It queries the sys_user table for all active users, then checks each user against the sys_user_grmember table (groups) and the sys_user_has_role table (roles).
3+
If a user has no associated groups and no assigned roles, their username is added to a list called orphanedUsers.
4+
Finally, the script prints the list, which can be used for user cleanup, security audits, or compliance purposes to ensure proper user management.

0 commit comments

Comments
 (0)