Figure out the correct LDAP filters for your Active Directory groups can be a hassle. With this script, you can get LDAP filters at ease after you synced your User directory connector (UDC) successfully.
LDAP filters are stored in UserAttributes table.
![User-added image](https://qlik.my.salesforce.com/servlet/servlet.ImageServer?id=015D0000003sAxC&oid=00D20000000IGPX&lastMod=1491980621000)
Resolution:
Prerequisite:
1. Make sure that you, Qlik Sense administrator, is a member of your target Active Directory groups.
2. Make sure that you, Qlik Sense administrator, is an existing user in Qlik Sense.
3. User directory connector (UDC) for Active Directory is created
4. The User Sync task for your UDC is Successfully synced
Instruction:
1. Download, unzip and run the script with PowerSchell (Right-click > Run with PowerShell)
2. Select the installation folder (e.g. C:\Program Files\Qlik\Sense)
![User-added image](https://qlik.my.salesforce.com/servlet/servlet.ImageServer?id=015D0000003sAx2&oid=00D20000000IGPX&lastMod=1491980577000)
3. Enter Repository password if needed.
![User-added image](https://qlik.my.salesforce.com/servlet/servlet.ImageServer?id=015D0000003sAx7&oid=00D20000000IGPX&lastMod=1491980608000)
4. Output <date>-<hostname>-GroupLDAPfilter.txt will be generated.
Tips:
Commonly used LDAP syntax for a filter is to "OR" 2 elements together with the "|" character (called the pipe character):
(|( element 1 )( element 2 ))
e.g.
(|( memberOf=<group 1> )( memberOf=<group 2> ))
Related Topic
How to Filter Active Directory to Sync Qlik Sense Users