title: Active Directory with LDAP is not returning employeeID attribute
body: <p>I am working on a project which needs ADS integration. I have developed application using java. </p>
  
  <p>I am trying to connect to ADS using LDAP, the same is working fine. It is returning many attributes like (samAccountName, email, givenName etc.) but it is not returning attribute <strong>employeeID</strong> which is crucial attribute in my application. </p>
  
  <p>Here is the code which I wrote to fetch user attributes.</p>
  
  <pre><code>private static DirContext ldapContext;
    private static String LDAP_URL = "ldap://192.168.10.101:3268";
    private static String SECURITY_AUTH = "simple";
    private static String CTXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
  
    public ADSService() {
    }
  
  
    public static void fetchEmployees(String username, String password){
          try
          {
            Hashtable&lt;String, String&gt; ldapEnv = new Hashtable&lt;String, String&gt;(11);
            ldapEnv.put(Context.INITIAL_CONTEXT_FACTORY, CTXT_FACTORY);
            ldapEnv.put(Context.PROVIDER_URL, LDAP_URL);
            ldapEnv.put(Context.SECURITY_AUTHENTICATION, SECURITY_AUTH);
            ldapEnv.put(Context.SECURITY_PRINCIPAL, username );
            ldapEnv.put(Context.SECURITY_CREDENTIALS, password);
            DirContext ldapContext = new InitialDirContext(ldapEnv);
            int count = 0;
  
            // Create the search controls         
            SearchControls searchCtls = new SearchControls();
  
            //Specify the attributes to return
            String returnedAtts[]={"sn","givenName", "samAccountName", "mail", "employeeID"};
            searchCtls.setReturningAttributes(returnedAtts);
  
            //Specify the search scope
            searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
  
            //specify the LDAP search filter
            String searchFilter = "(&amp;(objectCategory=Person)(objectClass=user))";
  
            //Specify the Base for the search
            //String searchBase = "dc=dom,dc=fr";
            //initialize counter to total the results
            int totalResults = 0;
            String searchBase = "dc=in,dc=corp,dc=orgname,dc=com";
            // Search for objects using the filter
            NamingEnumeration&lt;SearchResult&gt; answer = ldapContext.search(searchBase, searchFilter, searchCtls);
  
            //Loop through the search results
            while (answer.hasMoreElements())
            {
              SearchResult sr = (SearchResult) answer.next();      
              Attributes attrs = sr.getAttributes();
              count++;
              if (attrs != null)
              {
                  NamingEnumeration ne = attrs.getAll();
                  while (ne.hasMore())
                  {
                    Attribute attr = (Attribute) ne.next();
                    System.out.println("Attribute  :: " + attr);
  
                  }
                  ne.close();
                }
            }
  
          }catch(NamingException ne){
              ne.printStackTrace();
          } catch (Exception e){
            e.printStackTrace();
          }
  
      }
  </code></pre>
  
  <p>Please help me to get <strong>employeeID</strong> attribute</p>