title: UserPrincipal oUserPrincipal = UserPrincipal.FindByIdentity(ctx, found.DisplayName) returns null
body: <p>Not sure why this happens but when I run this code it works on one server but not on another.</p>
  
  <p>Both servers return a correct found.DisplayName however only one server returns a value for oUserPrincipal the other returns a null value.</p>
  
  <p>Line of error:</p>
  
  <pre><code>       UserPrincipal oUserPrincipal = UserPrincipal.FindByIdentity(ctx, found.DisplayName) returns null
  
  
          dynamic config = _getExpandoFromXml("config.xml");
  
          PrincipalContext ctx = new PrincipalContext(ContextType.Domain, config.activeDirectory.sDomain, config.activeDirectory.sDefaultOU,config.mailServer.user, config.mailServer.pass);
          UserPrincipal user = new UserPrincipal(ctx);
  
          PrincipalSearcher search = new PrincipalSearcher(user);
          Console.WriteLine("before foreach");
          foreach (Principal found in search.FindAll())
          {
              try{
                  if (found.DisplayName == null)
                  {
                      Console.WriteLine("found.Dispalyname is null");
                  }
                  else
                  {    
                      Console.Write("Dispalyname: ");
                      Console.WriteLine(found.DisplayName);
                  }
                  UserPrincipal oUserPrincipal = UserPrincipal.FindByIdentity(ctx, found.DisplayName);
                  Console.Write("looking for user: ");
                  Console.WriteLine(found.DisplayName);
                  Console.WriteLine("after findbyidentiy");
                  if (oUserPrincipal == null)
                  {
                      Console.WriteLine("oUserPrinciapal is null");
                  }
                  if (oUserPrincipal.LastPasswordSet == null)
                  {
                      Console.WriteLine("lastpasswordset is null");
                  }
                  DateTime? dateOrNull = oUserPrincipal.LastPasswordSet;
                  Console.WriteLine("after LastPasswordSet");
  </code></pre>