'PHP-EWS: 401 Error on accounts that have not been in use
Certain accounts are returning 401 upon usage of the GetPassworedExpirationDate method. The accounts are regularly used as email accounts, however EWS returns 401 when they are used in the php-ews methods. When we run a connectivity test on the account, the values all return successful. We have also tried resetting the password, this also did nothing.
Example request:
$client = new Client('outlook.office365.com', $request->json()->get('emailaddress'), $request->json()->get('password'), Client::VERSION_2016);
$client->GetPasswordExpirationDate(new GetPasswordExpirationDateType());
Example response:
Exception: SOAP client returned status of 401.
RuntimeException: Autodiscovery failed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
