How to connect to an Exchange sub account using EWS? RRS feed

  • Question

  • I have been developing an email client within Visual Studio 2019 using C#. While also using the Microsoft.Exchange.WebServices library.

    I need to connect to an email, but that email has sub accounts on it.


    • username/email:
    • sub account:

    I have no idea how to connect to the sub account or if you can?

    // The code used to connect to an email address.
        ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
        service.Credentials = new WebCredentials(Email, Password, Domain);
        service.Url = new Uri(Asmx);

    Any help would be greatly appreciated.

    • Moved by Manu Meng Wednesday, September 11, 2019 2:58 AM relocate
    Tuesday, September 10, 2019 11:16 AM

All replies

  • Hi

    Is the sub account a mailbox in the organization at all?

    Mac Outlook uses EWS to connect, you need to have an account to connect to. You need to call the EWS url for exchange.

    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, September 10, 2019 1:15 PM
  • It is a question related to EWS development, I will help move the thread to this forum.


    Manu Meng

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Wednesday, September 11, 2019 2:58 AM