Exchange Web Services Managed API: Accessing other users items

Luke picture Luke · Sep 24, 2010 · Viewed 9.9k times · Source

Is it possibly to access the folders and items of other Exchange accounts other than the one of the logged in user?

Can I do this via Exchange Web Services Managed API?

Answer

Oleg picture Oleg · Sep 30, 2010

Yes it is possible, but you should know the password of the other user or grab in some ways this credentials (NetworkCredential object). The typical first lines of you code could be

ExchangeService myService = new ExchangeService (ExchangeVersion.Exchange2007_SP1);
myService.Credentials = new NetworkCredential ("[email protected]", "P@ssword00");

so you can access Exchange Server Web Services with the account which is other as the current user. See ExchangeService object description for more information.

If you are an admin you can make user impersonation by SMTP address.