I am using EWS API in my console application to process mailbox items and my connection script looks like
ExchangeService service = new ExchangeService(Excha
I know this is a fairly old solution, but it was still very helpful to me. I have a few tools that worked with the "normal" network version of Exchange, but so far my tests with Exchange Online failed (i got errors like "The Autodiscover service couldn't be located", etc).
Essential here is to use WebCredentials instead of NetworkCredential and a e-mailaddress instead of a username.