EWS returns 401 when using CURLAUTH_BASIC | CURLAUTH_NTLM, but works with CURLAUTH_NTLM
arkuuu opened this issue · comments
Hello,
An Exchange server I'm trying to connect to gives me a 401 response.
When I change the line https://github.com/jamesiarmes/php-ntlm/blob/master/src/SoapClient.php#L196
CURLOPT_HTTPAUTH => CURLAUTH_BASIC | CURLAUTH_NTLM,
to
CURLOPT_HTTPAUTH => CURLAUTH_NTLM,
it works without any problems.
Does anyone have an idea why it works only with CURLAUTH_NTLM
, but not with both?
While I can't tell you exactly why this happens, some Exchange servers only support one of the httpauth options rather than both. You can override the default by setting "curlopts" in the options passed to the constructor.
So, it depends on the server, ok. Thank you!