Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 401 - Unauthorized when connecting to outlook.office365.com #8

Open
sylnit opened this issue Oct 27, 2022 · 7 comments
Open

Error 401 - Unauthorized when connecting to outlook.office365.com #8

sylnit opened this issue Oct 27, 2022 · 7 comments

Comments

@sylnit
Copy link

sylnit commented Oct 27, 2022

This was working properly up until this month October.

When it tries to connect to outlook.office365.com, I get the following error:

debug.INFO: array (
'function' => 'processEmailTickets: ews->mail->unread',
'message' => 'SOAP client returned status of 401.',
)

My username and password are correct as I have tested this on a web browser.

@amirsanni
Copy link
Owner

Did anything change recently? Did you update the app? Was there an upgrade on your mail infrastructure?

@sylnit
Copy link
Author

sylnit commented Oct 27, 2022

I didn't change anything from my end. But I am suspecting that Microsoft did some upgrade of the authentication method on the office365 server. It will help to see if anyone using this library is also connecting to office365 and it's working for them.

@sylnit
Copy link
Author

sylnit commented Oct 27, 2022

Here is what I found:
https://stackoverflow.com/questions/33594652/exchange-web-services-issue-soap-client-returned-status-of-401-in-php#:~:text=Status%20code%20401%20means%20that,Oauth%20%2Dauth%20scheme%20for%20EWS.

Apparently, username and password was removed this month, October 2022.

Look at similar issue discussion on jamesiaremes php-ews repo.
jamesiarmes/php-ews#212 (comment)

@amirsanni
Copy link
Owner

I tested a live account with this fix. Can you try if it works for you?

@amirsanni
Copy link
Owner

Oh!

@amirsanni
Copy link
Owner

If you have your access token, you can try this.

@amirsanni
Copy link
Owner

Get access token: jamesiarmes/php-ews#212 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants