jamesiarmes / php-ews

PHP Exchange Web Services
http://jamesarmes.com/php-ews/
MIT License
567 stars 302 forks source link

How to connect to an Office365 Server using PHP-EWS (Getting 503) #602

Closed itsdileep closed 1 year ago

itsdileep commented 2 years ago

Version (e.g. 1.0, dev-master): PHP version: 7.0 Microsoft Exchange version: 2016

Description of problem:

I am using the hybrid server (Combination of AD directory Exchange and office 365 ). Firstly i create the account in my local exchange server then it will sync with office 365. my code is working until change password, after change the password now getting 503 error.

When I try with exchange server URL, then username and password validate successfully but when try to get events the error come --No mailbox with such GUID - ErrorNonExistentMailbox (Because room created on office 365)

Actual issue start after change password.

Fatal error: Uncaught Exception: SOAP client returned status of 503. in C:\xampp\htdocs\Roombooking\Source\web\wowews\vendor\office365\src\Client.php:1651 Stack trace: #0 C:\xampp\htdocs\Roombooking\Source\web\wowews\vendor\office365\src\Client.php(1633): jamesiarmes\PhpEws\Client->processResponse(NULL) #1 C:\xampp\htdocs\Roombooking\Source\web\wowews\vendor\office365\src\Client.php(670): jamesiarmes\PhpEws\Client->makeRequest('FindItem', Object(jamesiarmes\PhpEws\Request\FindItemType)) #2 C:\xampp\htdocs\Roombooking\Source\web\wowews\find.php(100): jamesiarmes\PhpEws\Client->FindItem(Object(jamesiarmes\PhpEws\Request\FindItemType)) #3 {main} thrown in C:\xampp\htdocs\Roombooking\Source\web\wowews\vendor\office365\src\Client.php on line 1651 {"mode":"full","isActive":false}

willbonde commented 2 years ago

Hey @itsdileep - did you ever find a solution? Running into the same issue.

itsdileep commented 1 year ago

@willbonde Yes will, it was always take time to sync password to main office 365 Server. Now we have implemented the OAuth2.0 so now its working without any issue.