title: LDAP AD query. What does the dollar sign in OU=$Customer does
body: <p>I am trying to get all the members of a group in two different Active Directories (AD) domains of the same company.</p>
  
  <p>To do that I get first the full Distinguished Name (DN) of each group from the Active Directory Users and Computers (ADUC) Attribute Editor as specified <a href="http://activedirectoryfaq.com/2014/10/ad-attribute-editor-missing-make-search-visible/" rel="nofollow">here</a>.</p>
  
  <p>The first group DN is: </p>
  
  <pre><code>*CN=first-group,OU=organization-unit-name,DC=first,DC=company,DC=com*
  </code></pre>
  
  <p>The second group DN is: </p>
  
  <pre><code>*CN=second-group,OU=$Customer,OU=one,OU=two,OU=three,OU=four,DC=second,DC=company,DC=com*
  </code></pre>
  
  <p>Then I use the two following LDAP query filters in C# (I also tried them in ADUC).</p>
  
  <p>For the domain <strong><em>first.company.com</em></strong> and the <strong><em>first-group</em></strong> I apply the following filter:</p>
  
  <pre><code>*(&amp;(objectCategory=*)(memberOf=CN=first-group,OU=organization-unit-name,DC=first,DC=company,DC=com))*
  </code></pre>
  
  <p>And I get 123 Results as expected/</p>
  
  <p>For the domain <strong><em>second.company.com</em></strong> and the <strong><em>second-group</em></strong> I apply the following filter:</p>
  
  <pre><code>*(&amp;(objectCategory=*)(memberof=second-group,OU=$Customer,OU=one,OU=two,OU=three,OU=four,DC=second,DC=company,DC=com))*
  </code></pre>
  
  <p>However now I get only one result. in more detail myself. This is not what was expected.</p>
  
  <p>I do know alternate ways to find the expected result in the ADUC by clicking in the Members tab once selecting the <em>second-group</em> but I need an LDAP filter to do it because I want to do get the results in C#.</p>
  
  <p>Does anybody knows what the $Customer is doing?
  What the dollar means in general in an LDAP filter?</p>
  
  <p>I tried the filter without Ou=$Customer but it returns no results.</p>
  
  <p>Thanks for the helping!</p>