ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

"INFO: Failure authenticating with NTLM <any realm>@xxx.xxx.com"

Open ceyhunkerti opened this issue 12 years ago • 12 comments

I keep getting this error while trying to connect. Any idea ?

ceyhunkerti avatar Sep 03 '14 16:09 ceyhunkerti

http://stackoverflow.com/questions/16649678/ntlm-authentication-scheme-selected-error

I personally haven't tried the autodiscover means of authentication, and haven't seen this error, so the two may be related....

jimdunkerton avatar Sep 04 '14 15:09 jimdunkerton

being getting the same error on Linux. the program works sometimes, but not always. Not using audodiscover. it's weird that it works sometimes, but throwing error at other times

Log: Oct 08, 2014 2:30:38 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: Failure authenticating with NTLM @xxx.xxx.com

conancain avatar Oct 09 '14 14:10 conancain

Oct 22, 2014 11:18:20 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: NTLM authentication scheme selected Oct 22, 2014 11:18:21 AM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: Failure authenticating with NTLM @xxx.xxx.com:443 401 null Server : Microsoft-IIS/8.0 WWW-Authenticate : NTLM X-FEServer : G9W4036 request-id : d44cbb28-e368-4e4d-8444-c645144f6575 Content-Length : 0 Date : Wed, 22 Oct 2014 03:18:21 GMT X-Powered-By : ASP.NET

I always getting this error, can somebody help me on it? I am working on windows 8 and I wrote codes like this : ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); ExchangeCredentials credentials = new WebCredentials("username", "password", "domain"); or using WebCredentials("email", "password"); service.setUrl(new URI("https://xxx.hp.com/ews/exchange.asmx")); service.setCredentials(credentials); service.setTraceEnabled(true); But I can't access the server.

Agileaq avatar Oct 22 '14 03:10 Agileaq

we solved this problem by switching to common-codec-1.7.jar from the 1.2 version and used a different fork of the project

conancain avatar Oct 30 '14 17:10 conancain

@d10li any chance of submitting a pull request that would address this issue? What fork are you referring to?

vboctor avatar Oct 30 '14 17:10 vboctor

@d10li I tried to change my common-codec.jar to version 1.2 , but it still not work.

Agileaq avatar Oct 31 '14 03:10 Agileaq

@vboctor we are using this code base: https://github.com/casimirenslip/EWS-Java-API It use Apache Http Client 4.xxx. Code likely differs a lot already.

@Agileaq , we changed the .jar from 1.2 to 1.7, sounds like you changed to 1.2 instead

conancain avatar Oct 31 '14 13:10 conancain

@d10li I've pinged @casimirenslip about the possibility of a pull request. I looked at his project history but unfortunately the changes were done as part of the initial commit, so it is not easy to review it or cherry-pick from it. Hopefully, we will figure out a way to consolidate.

vboctor avatar Oct 31 '14 14:10 vboctor

I will try in the next weeks to update that. I made a new fork from the current code, so I can update to last http client librairies, which will solve NTLM problems.

Sorry to not do it faster but network team at my job are blocking a lot of sites, including github (don't know why and they don't know why although :( ) but will try.

casimirenslip avatar Nov 01 '14 12:11 casimirenslip

@casimirenslip Okay, I will wait for the updates.

Agileaq avatar Nov 03 '14 07:11 Agileaq

I made a PR with the update of httpClient 4.3.5 (last version).

Of course it will need further testing, however it works well with exchange 2010.

casimirenslip avatar Nov 04 '14 14:11 casimirenslip

@Agileaq Maybe you can try to remove the parameter domain!

baininghan avatar Dec 12 '14 08:12 baininghan