none
EWS CreateItem request failing due to authentication RRS feed

  • Question

  • Since migrating resource mailboxes to Office 365 my EWS client is failing to create resource bookings. This is the error I receive

    [org.apache.http.impl.auth.HttpAuthenticator.isAuthenticationRequested():77] Authentication required
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():107] webmail.fmr.com:443 requested authentication
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():157] Selected authentication options: [NEGOTIATE, NTLM]
    [org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse():198] Generating response to an authentication challenge using Negotiate scheme
    [org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse():207] NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))
    org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse():198] Generating response to an authentication challenge using ntlm scheme
    [org.apache.http.impl.auth.HttpAuthenticator.isAuthenticationRequested():77] Authentication required
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():107] webmail.fmr.com:443 requested authentication
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():136] Authorization challenge processed
    [org.apache.http.impl.auth.HttpAuthenticator.isAuthenticationRequested():77] Authentication required
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():107] webmail.fmr.com:443 requested authentication
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():136] Authorization challenge processed
    [org.apache.http.impl.auth.HttpAuthenticator.handleAuthChallenge():139] Authentication failed
    [org.springframework.ws.client.core.WebServiceTemplate.handleError():697] Received error for request [SaajSoapMessage {http://schemas.microsoft.com/exchange/services/2006/messages}CreateItem]
    CreateMeeting.dispatchBookingRequest():83] EWS Create Meeting REQUEST failure::Method returning boolean response to indicate failure::Unauthorized [401]
    Can anyone advise how authentication has changed in Office 365?

    (My client sends a credential object in the HTTPClient request header using the username in UPN format. The client worked against Wxchange 2010)

    Friday, September 22, 2017 3:55 PM

All replies

  • Office365 doesn't allow Integrated (or NTLM) Auth so you need to use basic authentication or switch to using OAuth but I would try basic first as that should be a lot easier to implement and then you might want to switch to oAuth to increase the security in you app at a latter time.

    Cheers
    Glen

    Sunday, September 24, 2017 11:37 PM