Search code examples
asp.net-mvcoutlookexchangewebservices

Microsoft Exchange WebService Contact Email Addresses formatting


I have set up a microsoft exchange web service to allow me to send and receive data to and from my Microsoft Outlook account.

I am attempting to get the saved Contacts information under my profile and then display this information in a similar format as the Microsoft Outlook 2013 desktop application on a web page.

Unfortunately, I have noticed, any email I have allowed Outlook to auto complete for me (ie recognising the email address I have started typing is in my address book and I press enter to select the suggested email), the string value I get back on my web page is what seems to be the folder root url rather than the email value itself.

ie. "/o=ParentFolder/ou=Group1/cn=Recipients/cn=address1" as opposed to "[email protected]"

My question is, is there a way to always return the actual email value back regardless of whether the auto complete feature is used or is there another function I can use that allows me to send the root value down and it fetches the corresponding email string?

thanks


Solution

  • This is the actual email address of type "EX" (as opposed to "SMTP"). Did you add a GAL user to the Contacts folder? You will need the Email1OriginalDisplayName property (DASL name http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/8084001F). You should be able to retrieve it using EWS. Take a look at the contact with OutlookSpy (I am its author) - click IMessage button.