title: Unboundid not returning requested LDAP attributes. Why?
body: <p>I have written a program that reads a webservice, retrieving user data, and then is supposed to push that data to ActiveDirectory, thus updating the user's title, address, phone numbers, etc.</p>
  
  <p>The problem is that when I perform the search using the Unboundid Connection class the requested attributes are not returned.  Below is the search code:</p>
  
  <pre><code>SearchResult result = connection.search( properties.getProperty("ldap.search.baseDN"), 
                          SearchScope.SUB, "(cn=" + userId + ")", 
                          "personalTitle", "department", "company", "manager", "telephoneNumber", 
                          "streetAddress", "I", "st", "postalCode", "c", "pager", "mobile", 
                          "fax", "cn");
  </code></pre>
  
  <p>The above code locates the desired user and the cn attribute is returned as expected, but the other attributes all fail to return. If I connect to AD using JXplorer using the same connection credentials, I'm able to see all the desired attributes exist, but are simply not being returned.</p>
  
  <p><img src="https://i.stack.imgur.com/pLbFp.png" alt="enter image description here"></p>
  
  <p>I have tried substituting SearchRequest.ALL_OPERATIONAL_ATTRIBUTES,             SearchRequest.ALL_USER_ATTRIBUTES and SearchRequest.REQUEST_ATTRS_DEFAULT rather than listing the fields explicitly, but with no success.</p>
  
  <p>I have also looked at the 'Schema' object returned from 'connection.getSchema()' and can see that personalTitle should exist:</p>
  
  <pre><code>connection.getSchema().getAttributeType("personalTitle")
  </code></pre>
  
  <p>The above code returns: </p>
  
  <p>1.2.840.113556.1.2.615 NAME 'personalTitle' SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE</p>
  
  <p>So maybe this is a user permission issue?  Has anyone experienced this and know how to resolve it?</p>
  
  <p>Thanks,
  Mike</p>