Receiving 401 when using EWS with office 365 RRS feed

  • Question

  • Hi - I am writing an app on a non Microsoft platform. I'm using the XML requests and sending HTTP POST requests directly to the server. Last week, everything was working fine. This week, I started getting 401 when I tried to POST the initial auto discover payload to https://autodiscover.<domain>.com/autodiscover/autodiscover.xml.

    When I used the exchange test connectivity, it passes this part and is about to retrieve a message from the server. However, my code used to work and now returns 401. I'm not sure if something changed on the server side (I do not own the server).

    I suspect maybe its the way I'm formatting my HTTP POST request, although exchange test connectivity does not show the request during the test (only the response). My Java app sets the following header:

    Authorization: Basic user@domain.com:password

    and I'm receiving the following error, which seems to indicate that there is something with the Authorization header. Does anyone know what is going on?

     status code: 401, headers {
        "Content-Length" = 58;
        "Content-Type" = "text/html";
        Date = "Fri, 06 Jun 2014 07:07:52 GMT";
        Server = "Microsoft-IIS/7.5";
        "Www-Authenticate" = "NTLM, Negotiate, Basic realm=\"autodiscover.domain.com\"";
        "X-Powered-By" = "ASP.NET";

    Friday, June 6, 2014 7:09 AM