0 votes
by (180 points)

I want to search contacts via EWS and getting the specified data e.g. company, emailadress, phone.

Actually I can get this data by reading the xml of the response, is it planned that there will be an EwsContact object like the EwsMessage object to get all information of a contact?

Is it possible to get theese contact data when using ResolveNames function? I Know that it is only a flag (ReturnFullContactData) in the EWS request to get the contact data besides the mailbox data.

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (15.2k points)


EwsContact class or any similar class is not planed for the near future. You are the first one that asks about it, actually. So, EwsItemInfo.ToXml() is currently the only way how to get the information you mentioned.

ResloveName function is used when you know only a part of your contact, let's say "John". ResolveName function returns all names and email adresses, that contains "John", so it may result in: "John Smith", "Alice Johnson" and so on. Unfortunately, EWS does not returns id for the resulting items, so it is only useful to populate a list for a user of your application that some contacts are based on the contact part provided. Additionally, the resulting set contains maximum of 100 items, as stated in MSDN ResolveName operation page.

by (180 points)
Thx for the reply.
I know the limitation of ResolveNames in EWS, because I already worked with EWS.
If I have the contacts in global address list, I can only Access to it via ResolveNames function of EWS.
In this case I also wanted to get the contact data by using ResolveNames (e.g. by reading the Response XML).
By the way it is possible to search for mailaddress in ResolveNames function with the pattern 'smtp:<mailaddress>'.
In a first step I will work with the XML and with contacts via search in the user's contact Folder or a public folder