How to filter active directory group from sys_user table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022 04:12 PM
Hello,
We would like to see only the users that are in specific Active Directory Group from Catalog Item variable Request For.
It is possible to filter the active directory group from sys_user table? Please advise! Thank you
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2022 07:58 PM
javascript: var userArray = []; var groupMemberGr = new GlideRecord("sys_user_grmember");
groupMemberGr.addQuery("group.name", "G_SECURITY");
groupMemberGr.query();
while(groupMemberGr.next()){
userArray.push(groupMemberGr.getValue('user'));
}
'sys_idIN'+userArray.join(',');
Hope that helps!
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 09:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 07:57 AM
Sorry for the late reply, because I was out sick. I thought about doing that Majji. However, by doing that, we have to continually change the condition if there is changes, which I think is not efficient. Any other suggestions. Thank you
