
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 01:04 AM
Hello ServiceNow community, I have a requirement to know who from the active users we have is not a member of a group with type "ITIL" (Type is an out of the box field on the group table.
we are on Helsinki Patch 11
Thanks a lot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 02:06 AM
Hi Ahmed,
You can pull all users who are not mapped to any group using the following method.
1. Create a script include and place the below function in it.
script:
*************************
*****************************
2. Create a report on 'sys_user' table and call the script include function in the report filter. Please refer the below screenshot. On running the report, you'll get the list of users who are not member of any group.
Similarly, you can use the below script to fetch the list of users who are member of non ITIL type group.
-Udhay
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 05:40 AM
OK let me just confirm, all of your users are in groups and only those in a group with the ITIL role have the ITIL role yes?
If so and the data you are looking for is a list of users who don't have the ITIL role then the original script include i sent on this thread will return you that data.
If not, please clarify your requirement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2017 02:50 PM
Thank you, David,
My requirement is to make sure all the active users we have on the system are a part of a group, and if they are not, I need to target those who are not a part of any group I would prefer if I could even choose the type of group.
Why?
Our approval workflow is built based on the user group (to know the department head,...) from the group that the user belongs to. so I need to make sure all the users belong to a group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 02:43 AM
Our approval workflow is built based on the user group (to know the department head,...) from the group that the user belongs to. so I need to make sure all the users belong to a group.
Erm.. groups or departments?
A user can belong to several groups, but only to one department.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 02:06 AM
Hi Ahmed,
You can pull all users who are not mapped to any group using the following method.
1. Create a script include and place the below function in it.
script:
*************************
*****************************
2. Create a report on 'sys_user' table and call the script include function in the report filter. Please refer the below screenshot. On running the report, you'll get the list of users who are not member of any group.
Similarly, you can use the below script to fetch the list of users who are member of non ITIL type group.
-Udhay
Please Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2017 03:30 PM