views:

26

answers:

1

I am using exchange server 2007 (outlook) to configure email accounts..

How can we retrieve the details of the users (mailboxes) present on the exchange server.

This feature is there in outlook. By double clicking the id and checking details.

But, how can this be done programmatically? (using c#)

A: 

You can use either the Web Services part of the Exchange SDK or the newer Web Services Managed API to gather info or do just about anything Outlook can do (see this chart for the differences). Both links given should lead you to how-to's, reference pages, and example code to help you get started.


If you want to query the Global Address List (GAL), there are several methods. In OWA (thus, HTTP protocol) there's a command called "galfind" (example code here; reference here). Or you can use ADSI to search the GAL. Or there's CDO or MAPI, but I would steer away from those if possible.

ewall
I have tried this code.. i can only query my contacts.. eg.if my id is [email protected] i can only query contacts of this id. not universal contacts.. i.e. complete users which are at domain.com
Chitresh
Ah, yes--using the EWS only allows you to query the saved contacts for the logged-in user. In my answer above I added links to the different methods for querying the Global Address List.
ewall