title: c# Active Directory Services findAll() returns only 1000 entries
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/90652/can-i-get-more-than-1000-records-from-a-directorysearcher-in-asp-net">Can I get more than 1000 records from a DirectorySearcher in Asp.Net?</a>  </p>
  </blockquote>
  
  
  
  <p>I am searching for existing logins using ADS Directory searcher findAll() method (as in following code). It appears the findall method returns only 1000 entries although there are more entries than that.
  How do I findAll() of every login ?</p>
  
  <pre><code>    IList&lt;string&gt; adslist = new List&lt;string&gt;();
      using (DirectoryEntry de = new DirectoryEntry("LDAP://armlink.com", null, null, AuthenticationTypes.Secure))
      using (DirectorySearcher ds = new DirectorySearcher(de, "(objectclass=user)", new string[] { "samaccountname" }))
  
          foreach (SearchResult sr in ds.FindAll())
          {
              string[] e = sr.Path.Split(new string[] { "LDAP://", "OU=", ",", "DC=", ".com", "/CN=" }, StringSplitOptions.RemoveEmptyEntries);
              ResultPropertyCollection pc = sr.Properties;
              adslist.Add(e[0] + "/" + pc["samaccountname"][0].ToString());
              //   Debug.WriteLine(adslist.Last());
          }
  </code></pre>