Hello,
Various exchange services can be tested with online testconnectivity tool from Microsoft. You may test the EWS connectivity as follows and see it works. If not adjust the code or server settings. If you need further support, please paste the test result here:
- Open https://testconnectivity.microsoft.com.
- Select Office 365 or Exchange Server as per your setup.
- Select Service Account Access and perform Test. Use the same parameters you use in code
Thanks,
Manu