Script URL:
Version of script: 3.2.5
Hosting company: Krystal.uk
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I am trying to configure POP3 or IMAP Fetching using a Office 365 fully licenced user mailbox with POP and IMAP turn on.
For POP3 I've tried the following settings in HESK:
Host: outlook.office365.com
Port: 995
TLS
email address and password of the account I wish to check for messages. (below I have changed these to xyz)
With the above I get the following error:
Error: Password error: Logon failure: unknown user name or bad password.
Connecting to outlook.office365.com ...
S +OK The Microsoft Exchange POP3 service is ready. [TABPADIAUAAyADYANQBDAEEAMAAxADMAMQAuAEcAQgBSAFAAMgA2ADUALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]
C USER xyz@xyz.com
S +OK
C PASS xyz
S -ERR Logon failure: unknown user name or bad password.
However, I know the username and password is correct as I am using the same credentials for the SMTP connection which is working and I am also able to log into OWA with the same credentials.
For IMAP I've tried the following settings in HESK:
Host: outlook.office365.com
Port: 993
SSL
Do not validate certificate
email address and password of the account I wish to check for messages.
With the above I get the following error:
Error: Can not authenticate to IMAP server: AUTHENTICATE failed.
Retrying PLAIN authentication after AUTHENTICATE failed.
Retrying PLAIN authentication after AUTHENTICATE failed.
Can not authenticate to IMAP server: AUTHENTICATE failed.
It seems whatever combination of settings I try I cannot get either of these to work.
I've checked with my web host and they are not blocking any of the above ports.
Any suggestions on what the issue might be or what to try next.
Many thanks
POP3 an IMAP connecting to Office365 account
Moderator: mkoch227
Re: POP3 an IMAP connecting to Office365 account
Maybe you need to create an app password for Hesk?
https://support.microsoft.com/en-us/acc ... 07799387e9
You may also need to enable basic authentication for IMAP and disable Azure Active Directory security defaults:
https://docs.microsoft.com/en-us/exchan ... ap-outlook
https://support.microsoft.com/en-us/acc ... 07799387e9
You may also need to enable basic authentication for IMAP and disable Azure Active Directory security defaults:
https://docs.microsoft.com/en-us/exchan ... ap-outlook
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: POP3 an IMAP connecting to Office365 account
Thanks, I've checked and basic authentication is already enabled and we therefore do not use MFA.Klemen wrote: Tue Jun 14, 2022 6:48 pm Maybe you need to create an app password for Hesk?
https://support.microsoft.com/en-us/acc ... 07799387e9
You may also need to enable basic authentication for IMAP and disable Azure Active Directory security defaults:
https://docs.microsoft.com/en-us/exchan ... ap-outlook
Re: POP3 an IMAP connecting to Office365 account
Can you try (at least temporarily) disabling Azure Active Directory security defaults, then waiting a few hours and see if that helps?
https://docs.microsoft.com/en-us/micros ... -worldwide
https://docs.microsoft.com/en-us/micros ... -worldwide
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: POP3 an IMAP connecting to Office365 account
I disabled Azure Active Directory security defaults earlier today but unfortunately it hasn't made any differenceKlemen wrote: Tue Jun 14, 2022 6:58 pm Can you try (at least temporarily) disabling Azure Active Directory security defaults, then waiting a few hours and see if that helps?
https://docs.microsoft.com/en-us/micros ... -worldwide
Re: POP3 an IMAP connecting to Office365 account
It's definitely something in the O365 settings (not your web host) because the connection to the O365 server is OK, the authentication fails. And I know several people who use O365 without problems in Hesk.
Are you able to create an app password even if you MFA disabled in O365?
Are you able to create an app password even if you MFA disabled in O365?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: POP3 an IMAP connecting to Office365 account
Hi, today this problem happened to me.
I tried everything that was said here...
I even tried the beta and stable version with a clean install.
Unfortunately, nothing worked.
Does anyone have a solution?
I tried everything that was said here...
I even tried the beta and stable version with a clean install.
Unfortunately, nothing worked.
Does anyone have a solution?
Re: POP3 an IMAP connecting to Office365 account
Hello Jstanley,
This error comes about if you have activated OAUTH with a different email other than the one you are trying to use for pop. Ensure the email you inted to use for POP3 is the same as the one you have used to verify OAUTH.
This error comes about if you have activated OAUTH with a different email other than the one you are trying to use for pop. Ensure the email you inted to use for POP3 is the same as the one you have used to verify OAUTH.