How to filter active directory group from sys_user table?

Lisa Goldman
Kilo Sage

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

find_real_file.png

7 REPLIES 7

MrMuhammad
Giga Sage

Hi @Lisa Goldman,

If you are setting the value for source then you can use that to identify the active_directory groups and your RQ would be 

Source is <ACTIVE DIRECTOR SOURCE>

In case source is not being set then you can apply RQ on Created by. The Groups created by AD contains the name of AD service account that we use to establish the integration. So your RQ would be

Created by is <AD SERVIE ACCOUNT NAME>

Please check above two fields to see which works well.

Regards,

Muhammad 

Regards,
Muhammad

Hello Muhammad,

Thank you for helping. The source is empty and I could not find the AD group that I'm looking for under created by.  azure_ad_sync is listing under created by for all users.  Any suggestions?

find_real_file.png

 

@Lisa Goldman - I think I misread the question first.

You can do an advance reference qualifier with below script [Replace NAME OF GROUP with actual group name in line #2]:

javascript: var userArray = []; var groupMemberGr = new GlideRecord("sys_user_grmember");
groupMemberGr.addQuery("group.name",  "NAME OF GROUP");
groupMemberGr.addQuery("user",  gs.getUserID());
groupMemberGr.query();

while(groupMemberGr.next()){
    userArray.push(groupMemberGr.getValue('user'));
}

'sys_idIN'+userArray.join(',');

Hope that helps!

Regards,

Muhammad

Regards,
Muhammad

Hello Muhammad,

Let me clarify what we need help with.  We created an Active Directory Group called G_SECURITY.  The AD group has a few members in it.

We want to only show members of the G_SECURITY  AD Group in this Request For field.  It that possible?

Again, thank you for helping