0

I am using the latest version (1.0.0-beta-4) of James I. Armes php-ews code (https://github.com/jamesiarmes/php-ews) to connect to a local Exchange serge (Exchange 2010 SP1). This code connects just fine to Office/365, but it is getting ah 'HTTP 401 Unauthorized' back when it tries to connect to our local Exchange server. I have seen some old entries addressing similar problems, but none with a specific answer. Any suggestions on where to look?

1 Answers1

2

I remember encountering something similar, where the server that I was using threw a 401 if you the SOAP client was trying to send a combination of CURLAUTH_BASIC and CURLAUTH_NTLM. I remember the solution was to try and find the SoapClient file and changing the CURLOPT_HTTPAUTH option to either CURLAUTH_BASIC, CURLAUTH_BASIC | CURLAUTH_NTLM or CURLAUTH_NTLM until you found the setting that worked for you.

On a side note, I'd recommend you trying my alternative library, garethp/php-ews, as it provides many benefits (including simpler ways to use EWS) and I try to provide support for people on the issues page

Gareth Parker
  • 5,012
  • 2
  • 18
  • 42