NTLM authentication scheme selected error

yugalkishorbais picture yugalkishorbais · May 20, 2013 · Viewed 7.5k times · Source

I am developing a application in java to get email attachmants from exchange server (version 10), i have windows 7 (32bit) pc. my code is compiling successfully but giving error at run time, saying-

May 20, 2013 5:58:46 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: NTLM authentication scheme selected
May 20, 2013 5:58:47 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFO: Failure authenticating with NTLM <any realm>@autodiscover.mydomain.com:443


and my code is -

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
    ExchangeCredentials credentials;
    credentials = new WebCredentials("myuser", "mypwd","mydomain");
    service.setCredentials(credentials);
    service.autodiscoverUrl("[email protected]");

how to solve this NTLM authentication error?

Answer

Raj picture Raj · Jun 11, 2013

Enable Trace : service.setTraceEnabled(true); Are you sure your Exchange version is 2010 ? use this guide to check

also try removing service.autodiscoverUrl("[email protected]");