Getting full names of users in distribution list from EWS API

I'm using the EWS API against an Exchange 2010 instance to expand a distribution list via the ExchangeService.ExpandGroup method. While I am able to get the users in the group, all EmailAddress instances returned simply have the username in the Name field rather than their full name. I know that these users have full names in the GAL as I can see them when I examine the EmailAddress instance returned as part of an item (e.g. meeting recipient, email sender, contact, etc.).

I've tried using the overloaded signatures for the ExpandGroup method but they all yield the same result, except for the overload that takes the group ID (an ItemId instance) as I can't find a way to retrieve this group's ID using the distribution list email. I'd be interested in trying this once I can find the GroupID but that might be a question for another time...

Is there a way to retrieve full names of users given the distribution list? I am aware of the ExchangeService.ResolveName method, but as the number of users can be arbitrarily large I am wary of a method that only allows me to resolve one name at a time. I am also unable to make LDAP calls to resolve the data as the AD server is hosted by a third-party so I do not have access to it.



September 14th, 2015 11:29am