Trying to configure oauth for inbound emails! But following issues are being faced!
Mon Dec 26 16:55:47 2022 [47891][1][FATAL] Using imap handler class: Imap2Handler
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "IMAP open error | debug data"
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/imap\/ssl}"
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "ImapHandler:open: admin"
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "ImapHandler:open: 512"
Mon Dec 26 16:55:48 2022 [47891][1][FATAL] An Imap error detected: "IMAP open error | debug data end "
As I click on the monitored folders, the following screen pops up:
Hello,
Got the same error message even though External provider is ok and personnal oauth connexion is ok.
Thank you for admin
The username must be the email address you used to login in the outlook account! Try it and then let me know!
Also following permission were given in the azure account :
Bungle
14 January 2023 10:25
5
I have the same issue.
The username is the email used to log into Office365. Permissions are set correctly in Azure.
opened 01:44AM - 14 Jan 23 UTC
#### Issue
Can't set 'Outbound Email' or create 'Personal Outbound Email Ac… count because authentication fails.
#### Expected Behavior
After setting up 'External OAuth Provider' and 'External OAuth Connector' and successfully retrieving an Access and Refresh Token, you should able to configure 'Outbound Email Settings' and setup a 'Personal Outbound Email Account', and also create inbound email account.
In the detail page for Personal Outbound Email Account , the 'send test email' should send test email when the correct settings are used.
#### Actual Behavior
In the detail page for Personal Outbound Email Account , the 'send test email' fails and returns an SMTP log that states
**`Authentication unsuccessful, the user credentials were incorrect.`**
**`SMTP Error: Could not authenticate.`**
SuiteCRm logs :
```
[FATAL] Using imap handler class: Imap2Handler
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
```
However, if you re-enter the password 'after' opening the page, the test succeeds and the email is sent correctly.
[forum post here](https://community.suitecrm.com/t/imaphandler-errors-how-to-setup-inbound-email-for-office365-v7-12-5/87565/6)
#### Possible Fix
unknown
#### Steps to Reproduce
1. Log into SuiteCRM as admin
2. Go to Admin > Outbound Email
3. Create or select/edit a Personal Outbound Email Account
4. Exchange Server: outlook.office365.com
5. Mail SMTP/SLL: TLS
6. Exchange Server Port: 587
7. User SMTP Authentication: X
8. Password: your O365 password
9. Send Test email
Authentication fails and displays SMTP Log
10. Enter Password again
11. Send Test Email
Test passes and email is sent
#### Context
Can't setup an office365 outbound or inbound email account
#### Your Environment
* SuiteCRM Version used: 7.13
* Browser name and version : Chrome Version 109.0.5414.74 (64-bit)):
* Environment name and version : Mysql8 PHP 7.4
* Operating System and version: Ubuntu 20.04
Did someone get this resolved, also have the same issue with External Provider and Connection work but getting “Login and Password incorrect” using OAuth, Imap 993 with the correct user on Azure
I am having the exact same issue. I was able to get one server working using the exact same procedure (Ubuntu 20) - my sandbox instance, but on production applying the same procedure I keep getting the invalid password.
Any assistance greatly appreciated. My logs show the same info as above!
2 Likes