title: How to read extended properties from Outlook contacts using EWS
body: <p>I'm currently attempting to read certain properties from Outlook Contact objects through Microsoft's EWS managed API.  I retrieve these Contact objects from the <code>FindItems()</code> function.  Some of these fields are extended properties such as the <code>Title</code> or <code>User1</code> field and I'm having difficulty reading them.  At the moment, I have:</p>
  
  <pre class="lang-cs prettyprint-override"><code>Guid propertySetId = new Guid("{00062004-0000-0000-C000-000000000046}");
  ExtendedPropertyDefinition titleProp = new ExtendedPropertyDefinition(propertySetId, 0x3A45, MapiPropertyType.String);
  ExtendedPropertyDefinition user1Prop = new ExtendedPropertyDefinition(propertySetId, 0x804F, MapiPropertyType.String);
  
  string title, user1;
  contact.TryGetProperty(titleProp, out title);
  contact.TryGetProperty(user1Prop, out user1);
  </code></pre>
  
  <p>When running this, <code>TryGetProperty</code> always returns false.  I have verified that these fields are populated in Outlook for the contacts that I am searching for.  </p>
  
  <p>Edit:  This is how I retrieve the contact objects.</p>
  
  <pre class="lang-cs prettyprint-override"><code>ExchangeService service = //...
  Mailbox userMailbox = new Mailbox(emailAddress);
  FolderId folderId = new FolderId(WellKnownFolderName.Contacts, userMailbox);
  FindItemsResults&lt;Item&gt; results;
  const string AQS = "Category:~&gt;\"CategoryTag\"";
  ItemView view = new ItemView(200);
  results = service.FindItems(folderId, AQS, view);
  foreach (var result in results)
  {
      Contact contact = result as Contact;
      //...Try to read fields
  }
  </code></pre>