Search code examples
c#exchange-server-2010ews-managed-api

EWS Data Contact Property for OrganizationalIDNumber


Using EWS Managed API 2.2, Microsoft.Exchange.WebServices.Data.Contact, I'd like to set the OrganizationalIDNumber property to store the employee number, but I cannot locate this or a similar property.

Please provide the code highlighting the contact property to use. Thanks!


Solution

  • You want to use Extended Properties(https://msdn.microsoft.com/en-us/library/office/dd633691(v=exchg.80).aspx) Below is my code to create a OrganizationalIDNumber where you can store integers (IDs)

    var organizationalIdTag = 0x3A10;
    var oContact = new Contact(pExchangeService);
    oContact.setExtendedProperty(organizationalIdTag, <<INSERT string OF ID HERE>>);
    oContact.Save();