<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Active Directory: Extract Users and Groups in Qlik Sense Documents</title>
    <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/ta-p/1479167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a short summary of how I connect to my corporate Active Directory and extract employee records and group memberships for theses employees. This is the most time efficient way I have found that works in my environment, but there might other query options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The below example connects to &lt;STRONG&gt;domain.local&lt;/STRONG&gt;. Please change these references to your domain name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First step is to define a connection in Qlik Sense. I have found that OLEDB and &lt;SPAN style="font-size: 13.3333px;"&gt;ADsDSOObject provider works. &lt;SPAN style="font-size: 13.3333px;"&gt;For server side app deployment, make sure the service account is allowed to connect to the AD, or add name and password or a authorized user in the connection settings. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OLEDB CONNECT TO [Provider=ADsDSOObject;Integrated Security=SSPI;Data Source=ldap://domain.local;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script connect to the directory with a LIB CONNECT string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LIB CONNECT TO 'LDAP Domain.local (tko)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below load statement extract all person records from AD. In the SQL query define the field names exactly as they are named in your AD. Notice, the FROM definition requires the LDAP URL to your domain. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE Not(userAccountControl bitand 2); // Exclude inactive accounts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;co,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;department,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;division,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;employeeType,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;givenName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;l,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mail,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;manager,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mobile,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;pager,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sn,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sAMAccountName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;telephoneNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;title,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;userAccountControl,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;displayName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;streetAddress,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;postalcode,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;physicalDeliveryOfficeName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE objectCategory = 'person' AND memberOf = '*'; // The * wildcard returns all records in Persons's objectCategory &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next step is to extract a list of all the existing groups in AD. Notice that your domain name has to be referred both in the FROM and WHERE in the SQL query. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectoryGroups:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name AS GroupName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;distinguishedName&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;distinguishedName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE objectCategory = 'CN=Group,CN=Schema,CN=Configuration,DC=domain,DC=local';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extracting all members of each group enables pairing groups with their exact members. Each group is queried to extract the member list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 0 to NoOfRows('ActiveDirectoryGroups')-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Pick next group name and distinguished name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vGroupName = Peek('name' , $(i), 'ActiveDirectoryGroups');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vDistinguishedName = Peek('distinguishedName' , $(i), 'ActiveDirectoryGroups');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE $(i) of $(#vNoOfRowsActiveDirectoryGroups) : $(vGroupName);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Load person identifier from the current distinguished group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The result is stored in Temporary table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Each iteration is added to the same Temporary table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TmpSamAccountNameGroups:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sAMAccountName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vGroupName)' AS GroupName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sAMAccountName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE objectCategory = 'person' AND memberOf = '$(vDistinguishedName)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extracted members are left joined to employee table, to map employees with their group membership. With the result of one table showing all employees and their AD group membership&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Left join to exclude sAMAccounts from group view that are not active&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Left Join ('ActiveDirectory')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident TmpSamAccountNameGroups;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Drop temporary tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Tables TmpSamAccountNameGroups, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectoryGroups;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jan 2018 03:39:19 GMT</pubDate>
    <dc:creator>ToniKautto</dc:creator>
    <dc:date>2018-01-30T03:39:19Z</dc:date>
    <item>
      <title>Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/ta-p/1479167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a short summary of how I connect to my corporate Active Directory and extract employee records and group memberships for theses employees. This is the most time efficient way I have found that works in my environment, but there might other query options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The below example connects to &lt;STRONG&gt;domain.local&lt;/STRONG&gt;. Please change these references to your domain name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First step is to define a connection in Qlik Sense. I have found that OLEDB and &lt;SPAN style="font-size: 13.3333px;"&gt;ADsDSOObject provider works. &lt;SPAN style="font-size: 13.3333px;"&gt;For server side app deployment, make sure the service account is allowed to connect to the AD, or add name and password or a authorized user in the connection settings. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OLEDB CONNECT TO [Provider=ADsDSOObject;Integrated Security=SSPI;Data Source=ldap://domain.local;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script connect to the directory with a LIB CONNECT string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LIB CONNECT TO 'LDAP Domain.local (tko)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below load statement extract all person records from AD. In the SQL query define the field names exactly as they are named in your AD. Notice, the FROM definition requires the LDAP URL to your domain. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE Not(userAccountControl bitand 2); // Exclude inactive accounts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;co,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;department,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;division,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;employeeType,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;givenName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;l,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mail,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;manager,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mobile,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;pager,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sn,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sAMAccountName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;telephoneNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;title,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;userAccountControl,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;displayName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;streetAddress,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;postalcode,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;physicalDeliveryOfficeName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE objectCategory = 'person' AND memberOf = '*'; // The * wildcard returns all records in Persons's objectCategory &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next step is to extract a list of all the existing groups in AD. Notice that your domain name has to be referred both in the FROM and WHERE in the SQL query. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectoryGroups:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name AS GroupName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;distinguishedName&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;name,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;distinguishedName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE objectCategory = 'CN=Group,CN=Schema,CN=Configuration,DC=domain,DC=local';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extracting all members of each group enables pairing groups with their exact members. Each group is queried to extract the member list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 0 to NoOfRows('ActiveDirectoryGroups')-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Pick next group name and distinguished name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vGroupName = Peek('name' , $(i), 'ActiveDirectoryGroups');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vDistinguishedName = Peek('distinguishedName' , $(i), 'ActiveDirectoryGroups');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE $(i) of $(#vNoOfRowsActiveDirectoryGroups) : $(vGroupName);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Load person identifier from the current distinguished group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The result is stored in Temporary table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Each iteration is added to the same Temporary table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TmpSamAccountNameGroups:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sAMAccountName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vGroupName)' AS GroupName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sAMAccountName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM 'LDAP://domain.local' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE objectCategory = 'person' AND memberOf = '$(vDistinguishedName)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extracted members are left joined to employee table, to map employees with their group membership. With the result of one table showing all employees and their AD group membership&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Left join to exclude sAMAccounts from group view that are not active&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Left Join ('ActiveDirectory')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident TmpSamAccountNameGroups;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Drop temporary tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Tables TmpSamAccountNameGroups, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDirectoryGroups;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 03:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/ta-p/1479167</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2018-01-30T03:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479168#M425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank u for sharing; I was just looking for something like this ! &lt;/P&gt;&lt;P&gt;U made mu day dear Toni &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479168#M425</guid>
      <dc:creator>OmarBenSalem</dc:creator>
      <dc:date>2018-01-30T15:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479169#M426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Worked perfectly with minor modifications for my environment.&lt;/P&gt;&lt;P&gt;I'm already excited for the potential use cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 16:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479169#M426</guid>
      <dc:creator>fosterma</dc:creator>
      <dc:date>2018-02-02T16:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479170#M427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you run into the &lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"QVX_UNEXPECTED_END_OF_DATA" error when returning a large number of objects?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 20:42:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479170#M427</guid>
      <dc:creator>lucienorrin</dc:creator>
      <dc:date>2018-02-06T20:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479171#M428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not extracted more than 5000 users and 10000 groups with this script, and have not seen any problem. Possible the execution time might get long if you have a very large directory, where the connection or server side might time out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you get the error when extracting users or during looping through groups?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 00:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479171#M428</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2018-02-08T00:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479172#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We read from Active Directory all the time &lt;EM&gt;(usually via Powershell &amp;amp; the server module snap-ins dsa.msc &amp;amp; dsac.exe).&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;I was excited to try this Qlik-centric method for parsing the AD catalog, and while a connection successfully establishes via &lt;SPAN style="font-family: Courier New;"&gt;ADsDSOObject, &lt;/SPAN&gt;the results getting returned from the query appear limited.&amp;nbsp; A few issues having on my end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The query won't return catalog listing unless the where clause narrows in pretty specifically, ran into the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"QVX_UNEXPECTED_END_OF_DATA&lt;/SPAN&gt;" any time the where clause attempted to widen out via wildcard&lt;/LI&gt;&lt;LI&gt;The field names of the AD elements don't appear to match the same used in Microsoft.ActiveDirectory Powershell module or the snap-ins.&amp;nbsp; &lt;EM&gt;(i.e. the ADsDSOObject query will return the fields Name, samAccountName, but can't find fields Surname, SID, or Givenname.&amp;nbsp; Attempting to use the 'Select' button in QV script editor to attempt schema browsing doesn't pull up anything)&lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I'd like to see more examples of how an &lt;SPAN style="font-family: Courier New;"&gt;ADsDSOObject&lt;/SPAN&gt; connection to ActiveDirectory works, a Powershell routine recursively dumping all AD objects out into a .csv &lt;EM&gt;(rows for all container types: groups, accounts, devices, etc..blended together, letting UI selection then separate them)&lt;/EM&gt; and then reparsed back in, has been the most expedient method experienced.&amp;nbsp; Always open to a quicker way though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 18:46:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479172#M429</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-02-12T18:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479173#M430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;My best guess on the QVX_UNEXPECTED_END_OF_DATA is that it due to the &lt;SPAN style="color: #3d3d3d; font-family: 'Courier New'; font-size: 13px;"&gt;ADsDSOObject&lt;/SPAN&gt; not managing the wider query. I use a wildcard in my query above to retrieve the personal records, which in my case are well below 10,000.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Does your powershell script have the exact same&amp;nbsp; LDAP queries as you attempt in Qlik Sense? &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The script above is a working example from my side, so the field names do come through as I expect. Unfortunately the Select option is not likely to enable browsing the schema, as the native OLEDB wizard does not understand LDAP. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 21:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479173#M430</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2018-02-12T21:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479174#M431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This example&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Qlikview Cookbook: Load Users and Groups from Active Directory &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/recipes/download-info/load-users-and-groups-from-active-directory/" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com/recipes/download-info/load-users-and-groups-from-active-directory/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;shows how to deal with the AD return limits by looping.&amp;nbsp; It also shows that you can use the FIRST nnn prefix to work around the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;QVX_UNEXPECTED_END_OF_DATA error.&amp;nbsp; It's a QV example, but works in QS if you change the connection to a lib.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 04:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479174#M431</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-02-13T04:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479175#M432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob, great example!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 04:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479175#M432</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2018-02-13T04:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479176#M433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Hello Rob, Toni, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt; &lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;In this second example cited, the connection established to AD via &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt;"&gt;ADsDSOObject&lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; works as well, and AD queries prepared in &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;EM&gt;'Load-Users-and-Groups-from-Active-Directory.qvw'&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; offer a little more guidance returning results for a poll of ADUsers &amp;amp; also members of a specific ADGroup.&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;However, limitations still apply.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;The query stopped at 1,000 rows &lt;/SPAN&gt;&lt;SPAN style="; color: #000000; font-size: 12pt;"&gt;&lt;EM&gt;(the script produced an error, but clicking past it, the post-reload data model still held 1,000 returned results).&amp;nbsp; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Circumventing this would be a big help as domains we’re polling will have tens of thousands of users &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;EM&gt;(and most enterprise clients would probably size the same)&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I expected changing the value of &lt;/SPAN&gt;&lt;STRONG style="line-height: 115%; color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;arg &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;would alter filter results, and assigning &lt;/SPAN&gt;&lt;STRONG style="line-height: 115%; color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;arg&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt; to &lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;(65) ‘A’ would return the list of users starting with that letter, but it appears the same list as &lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;(01) was returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;arg&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(01);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;// Set search start name to a very low value &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; An issue with the results from group membership was the localgroup cross-domain visibility.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;When I hardcoded the query to itemize a localgroup that had poly-domain members, all the members not in the current domain were absent.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;EM&gt;(do these omissions result from the query being performed from a specific domain, or permissions of programmer performing the query being allowed to peer into other domains?)&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; &lt;BR /&gt;While the technique of 'net' represents an iteration backwards, using this older command will include membership of poly-domain entrants &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;EM&gt;(who’s output can then be text parsed)&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;net localgroup /domain my_localgroup&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;&lt;EM&gt;The text parsing can be cumbersome, open to alternatives re: domain scope issues.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="color: darkgreen; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;For Powershell queries:&lt;SPAN style="color: #000000; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: darkgreen; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="color: darkgreen; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;#Exporting AD contents will be comprehensive&lt;SPAN style="color: blue; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;Get-ChildItem&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-Recurse&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-property&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;ObjectClass&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;PSPath&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="color: #000000;"&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: darkgreen;"&gt;#List ADGroup membership, will limit to just domain visibility (localgroup entries may be incomplete)&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;Get-ADGroup&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console'; font-size: 9pt; mso-bidi-font-family: 'Lucida Console';"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-filter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; {&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-like&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: darkred;"&gt;"Qlik*"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;%&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; {&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;Get-ADGroupMember&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-Recursive&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: orangered;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Name } &lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;%&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; {&lt;/SPAN&gt;&lt;SPAN style="color: orangered;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;name &lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;get-aduser&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;Select&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-Property&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;Surname&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;Givenname&lt;/SPAN&gt;&lt;SPAN style="color: darkgray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blueviolet;"&gt;SID&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; }&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&lt;BR /&gt;&lt;IMG __jive_id="193293" alt="20180213_QlikCommunity_using_ADsDSOObject_to_poll_ActiveDirectory.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/193293_20180213_QlikCommunity_using_ADsDSOObject_to_poll_ActiveDirectory.png" style="width: 620px; height: 599px;" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479176#M433</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-02-13T16:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479177#M434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: Calibri;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;I doubled back on this today with additional testing.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;Looking over the original code I thought maybe uncommenting &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;FIRST &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;1000 &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: Calibri;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;was the key to unlocking &lt;EM&gt;(though this was tried yesterday as well, but yesterday's screenshot does not reflect this).&amp;nbsp; &lt;/EM&gt;I expected being &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;able to report everything was working, and AD was extracting in a series of 1,000 row chunks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 12pt; font-family: Calibri;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;&lt;SPAN style="font-family: Calibri;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;However, in trying the verbatim sequence from the original, still getting an error. &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;To verify the LDAP connection &amp;amp; field names are valid, the first query does return a 1 row result matching a specific samAccountname.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: Calibri;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri; font-size: 12pt;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;&lt;SPAN lang="EN" style="color: black;"&gt;Repointing the RootDse to another domain is able to read the presence of single accounts/groups in other targeted domains, but when requesting membership of a localgroup defined in domain A, having accounts from both domain A &amp;amp; B, the listings returned skip the membership set from domain B.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;&lt;SPAN lang="EN" style="color: black;"&gt;Setting ErrorMode = 0 and then resetting it back to ErrorMode = 1 has started preventing the &lt;/SPAN&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;EXIT&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; &lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; WHEN ScriptError &amp;gt; 1 &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black;"&gt;from exiting the loop. Noticed this line also doesn’t end with a semi-colon like the other EXIT DOs. &lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;EM style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: gray; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;RootDse&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; = 'xxxxxxxxxx';&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;[Provider=ADsDSOObject;Data Source=LDAP://xxxxxxxxxx;]&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;//This is returning a row&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;ActiveDirectory:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;distinguishedName&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; SELECT name, distinguishedName&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FROM 'LDAP://$(RootDse)' WHERE samAccountname = 'xxxxxxx';&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;LET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: gray; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;arg&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;(01);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Set search start name to a very low value&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;DO&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; &lt;BR /&gt; ADUsers:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;FIRST&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Workaround for undefined SQL error. &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Add addtional Fields as required&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;name&lt;/SPAN&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;UserName&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;distinguishedName&lt;/SPAN&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;UserDN&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; select &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Add addtional Fields as required&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name, distinguishedName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Fields to select &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM 'LDAP://$(RootDse)'&amp;nbsp; WHERE objectCategory='person' &lt;BR /&gt; AND name&amp;gt;'$(arg)';&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Get rows where "name" is GT the arg&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;EXIT&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; WHEN ScriptError &amp;gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Stop loop if SELECT has error&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;EXIT&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; WHEN NoOfRows('nameTable') = 0;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Stop loop if SELECT returns nothing&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;EXIT&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; WHEN peek('UserName') = '$(arg)';&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// If the last "name" read is EQ to arg -- no more entries&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;LET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: gray; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;arg&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;('UserName'); &lt;/SPAN&gt;&lt;SPAN style="color: green; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;// Set the arg to the last "name" read&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;LOOP&lt;/STRONG&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-bidi-language: AR-SA; mso-fareast-language: EN-US; line-height: 115%; color: blue; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-latin; font-family: 'Courier New'; mso-fareast-font-family: Calibri;"&gt;exit&lt;/STRONG&gt; &lt;SPAN style="color: blue; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG alt="20180214_QlikCommunity_using_ADsDSOObject_to_poll_ActiveDirectory_Testing_attempt_02.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/193411_20180214_QlikCommunity_using_ADsDSOObject_to_poll_ActiveDirectory_Testing_attempt_02.png" style="width: 620px; height: 478px;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479177#M434</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-02-14T16:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479178#M435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;I tried your example from the cookbook site, changed "connect to..." to "lib connect to..." for Sense and I still get QVX_UNEXPECTED_END_OF_DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: un-commented the "First 1000" line and still get the same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479178#M435</guid>
      <dc:creator>lucienorrin</dc:creator>
      <dc:date>2018-04-12T14:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479179#M436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;My customer is experiencing exactly the same problem. &lt;/P&gt;&lt;P&gt;We had to do a fallback solution. Running the same application in version 10 which works perfectly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2018 10:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479179#M436</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2018-07-06T10:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479180#M437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm testing QV12.20 and it seems to be a bug (from IR to SR6), that "First 1000" and even "First 1" is ignored and you get the "QVX_UNEXPECTED_END_OF_DATA"-error. So there seems to be a bug in QlikSense and QlikView.&lt;/P&gt;&lt;P&gt;With QV12.00SR5 everything is working correctly.&lt;/P&gt;&lt;P&gt;I've sent a bugreport to our QV-partner, but it didn't get forwarded to Qlik.&lt;/P&gt;&lt;P&gt;In the meantime our IT-department changed the pagesize-parameter of the AD to avoid this error and I can't test it anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 08:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1479180#M437</guid>
      <dc:creator>peterwh</dc:creator>
      <dc:date>2018-08-22T08:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1623084#M4047</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; is it possible to retrieve the AccountExpiryDate for each user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1623084#M4047</guid>
      <dc:creator>prees959</dc:creator>
      <dc:date>2019-09-12T10:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1828793#M5317</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it also possible to load Nested users? Example:&lt;/P&gt;&lt;P&gt;AD GroupName: Manager&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Path&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;User 1&lt;/TD&gt;&lt;TD&gt;Users/Vienna/rootdse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Test User&lt;/TD&gt;&lt;TD&gt;Users/Vienna/rootdse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AdminGroup&lt;/TD&gt;&lt;TD&gt;security_groups/Group/Vienna/rootdse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;User 2&lt;/TD&gt;&lt;TD&gt;O365/Users/Vienna/rootdse&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment the Qlik Cookbook does not load the AdminGroup users properly per group because its a group in the members area, the path is different, is it somehow possible for the script to load those users from the Nested Group 'AdminGroup'?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1828793#M5317</guid>
      <dc:creator>JPT</dc:creator>
      <dc:date>2021-08-16T12:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1829195#M5319</link>
      <description>&lt;P&gt;I would think the AdminGroup member would be loaded as part of the Group load? If so, then I think the question would be how you want to model this nested relationship.&amp;nbsp; &amp;nbsp;Perhaps build a link table such that when you select group=Manager, it links to both Manager and AdminGroup in the Groups table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 18:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1829195#M5319</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-08-17T18:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1924366#M5511</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;did anyone have issues with retrieving the object "description" field ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i'm getting a blank field...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikaelsc_0-1651218953613.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/78244iEE1F12389AF62BDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mikaelsc_0-1651218953613.png" alt="mikaelsc_0-1651218953613.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 07:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/1924366#M5511</guid>
      <dc:creator>mikaelsc</dc:creator>
      <dc:date>2022-04-29T07:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/2066648#M5714</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I also enocutered the error 'EQ_QVX_SIZELIMIT_EXCEEDED'..&lt;BR /&gt;We tried to comment / uncomment the 1000 line, but it doesn't change anything.&lt;BR /&gt;Anyone has idea on how to overcome it ?&lt;BR /&gt;We are using QS August 2022 Patch.&lt;/P&gt;
&lt;P&gt;Attaching screenshot of the error.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EQ_QVX_SIZELIMIT_EXCEEDED.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/106242i059F65E52C927EAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EQ_QVX_SIZELIMIT_EXCEEDED.png" alt="EQ_QVX_SIZELIMIT_EXCEEDED.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 10:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/2066648#M5714</guid>
      <dc:creator>_Adam_</dc:creator>
      <dc:date>2023-05-02T10:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory: Extract Users and Groups</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/2066840#M5715</link>
      <description>&lt;P&gt;reduce the number of queried rows ?&lt;/P&gt;
&lt;P&gt;First 800 instead of 1000...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 15:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Active-Directory-Extract-Users-and-Groups/tac-p/2066840#M5715</guid>
      <dc:creator>mikaelsc</dc:creator>
      <dc:date>2023-05-02T15:49:04Z</dc:date>
    </item>
  </channel>
</rss>

