0
votes

I'm trying to access Exchange external contacts using EWS (those that aren't as part of contacts of the specific mailbox, but in tenant (company) level. They can be viewed and added from the Exchange Admin settings web page (Office 365) -> recipients -> Contacts tab), but I can't find how to do that, as all example that I found is talking about mailbox contacts. Any idea how I can read / write those contacts using EWS ?

Thanks

1

1 Answers

0
votes

You can't modify Contacts that are stored in Active Directory (or Azure Active Directory) using EWS (or any of the Mailbox API's). If your using Office365 look at the Graph API which currently has the ability to list,update,delete these type of contacts in beta https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/orgcontact . Otherwise look at using the Exchange Management Shell.

EWS has two functions to allow you access directory Contacts the first is the ResolveName operation if you specify the Directory as the search location. Or the FindPeople operation will also allow you to search the directory for contacts.