none
EWS authetication for "Outlook 365| RRS feed

  • Question

  • Hi, I have created the most basic account with a single user on office 365. It includes Lync, SharePoint and Outlook (Exchange).

    I need to retrieve mails melodramatically, so I d/l the EWS SDK 1.1 and created a minimal application that access my email account via EWS, trying both to find and to create mails. The application is similar to the MSDN sample "Working with Authentication in Microsoft Exchange Online".

    I use an admin account, but still get 401 error after Auto Discovery succeeds.

    Please note that my account is a simple Online Account, not connected to any on premise or any other AD/ADFS. 

    Any directions?

    10x

    Dani

    Monday, February 13, 2012 8:33 AM

All replies

  • Are you using a WSDL generated Proxy code or the Managed API if your using Proxy classes make sure initialize the cookie container eg

    ExchangeServiceBinding esExchangeServiceBinding = new ExchangeServiceBinding();  
    esExchangeServiceBinding.Credentials = ncCred;  
    esExchangeServiceBinding.Url = EWSURL;  
    esExchangeServiceBinding.CookieContainer = new CookieContainer();
    Cheers
    Glen
    Tuesday, February 14, 2012 3:52 AM