Outlook - System Email Account Setup Failed


Userlevel 7
Badge +17

Hello Everyone,

We are facing an issue while conguring Outlook email account but getting error “The mail receive has failed. NO LOGIN failed.”.

We have given valid credentials and other parameters but still getting this issue. Can anyone help me on this? 
Please find the screenshots for reference.

 


28 replies

Userlevel 7
Badge +10

Hi @Naveen B,

 

Hope you’re well. I compared your configuration with the one used by one of our customers, who has been using inbound mail processing with Office 365 for many years. Your configuration is correct but Office 365 is denying IMAP access.

There are two possible problems:

  1. IMAP access has been disabled for this account. I’m not an expert on Office 365 but can’t see a way to configure this from the admin center -- looks like it has to be done through PowerShell: Set-CASMailboxPlan
  2. Two-step authentication is enabled. You will need to create an app-specific password by following the instructions here: Manage app passwords for two-step verification
Userlevel 7
Badge +17

Hi @Gabriel Michaud  Hope you are doing well :)
 

Yeah, I’m good, and thank you :)  Thanks a lot for providing the possible options. I will look into it and keep you posted on the update.

 

Userlevel 1

Were you able to fix this problem? I am getting it and cannot seem to fix it even following the above instructions

Userlevel 1
Badge

To enable IMAP in O365 refer to this Microsoft doc.   

https://docs.microsoft.com/en-us/exchange/clients/pop3-and-imap4/configure-mailbox-access

 

I think you will need to use power shell to do this.  The app passwords can be problematic to use sometimes.  If you use an extremely strong password for this account, you can disable MFA for that ne account.

Hi @Naveen B,

Are you able to share if you managed to resolve the email setup error? I had the same error now and trying to figure out what went wrong. The email account to be used by Acumatica has been disabled for MFA and IMAP enabled.

Thank you in advance

Userlevel 7
Badge

Hi @Naveen B were you ever able to resolve this issue? Thanks!

Userlevel 7
Badge +17

Hi @Chris Hackett  I have not solved this issue, at that time we went for GMail instead Outlook and it was working for us. 

Userlevel 2
Badge

Has there been any resolution here?  We are running into the same issue with Office 365 Exchange.  Everything was working fine and then stopped about a month ago.  We can send emails, but can’t receive.  We get the same error messages.

Any progress, updates or ideas would be greatly appreciated.

Thanks!

Userlevel 5
Badge +2

https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-8361e398-8af4-4e97-b147-6c6c4ac95353

Incoming server: outlook.office365.com

Everything else looks correct.

Userlevel 4
Badge

Anyone have a resolution to this?  I had to have the password changed for one of my system email accounts.  It is accepting the password and allows me to save.  But when I test the email account I got the same error as in this community question.  The mail receive has failed. NO LOGIN failed.

 

Userlevel 4
Badge

In my issue, we resolved this.  The IT person said:  

The USERNAME did not match PRIMARY EMAIL ADDRESS in Office 365. 

Once they got it changed, then it worked fine.

Userlevel 2
Badge

I resolved this issue on Monday.  I changed the authentication method from Basic Authentication to Azure Modern Authentication.  Microsoft is dropping support for basic authentication for IMAP and POP.  I believe this is why this stopped working for us.

I followed these instructions and it worked immediately.  Good luck!

 

By using the System Email Accounts (SM204002) form, you can create an email account for MS Office 365 account.

 

 

 

Acumatica ERP uses the Azure AD service for authentication. We recommend opening Microsoft Azure Portal in the next tab of your browser, you will need to perform some configuration steps there.

 

 

Step 1: To Specify the General Settings of the Account

To specify the general settings of the account, do the following:

  1. Open the System Email Accounts (SM204002) form.
  2. On the form toolbar, click Add New Record.
  3. In the Summary area of the form, do the following:
    1. In the Account Name box, type the name of the system email account.
    2. In the Email Address box, type the email address of the account that will be used as the system email account.
    3. Optional: In the Reply Address box, type the email address that will be used for automatic replies.

 

 

Step 2: To Specify the Servers

To specify the settings of the servers, do the following:

  1. While you are still on the System Email Accounts (SM204002) form with the account you have created, be sure the Servers tab of the form is opened.
  2. In the Incoming Mail Protocol box (Server Information section), select the protocol to be used to connect to the incoming server.

 

 

 

If you have selected IMAP, every email that has been successfully collected from the server will be marked as read on the server.

 

 

 

    1. you have selected the IMAP protocol, in the Root Folder (on server) box, you need to type the path to the folder that will be used as the root folder for storing emails.
  1. In the Incoming Mail Server box, type <tt>outlook.office365.com</tt>.
  2. In the Outgoing Mail Server box, type <tt>outlook.office365.com</tt>.
  3. On the form toolbar, click Save.

 

 

Step 3: To Configure Authentication Through Azure AD

Now you will set up authentication through Azure AD as follows:

  1. While you are still working with the account on the System Email Accounts (SM204002) form, in the Authentication Method box, select the Azure Modern Authentication option.
  2. Click the pencil icon next to the External Application box. The system opens the External Applications (SM301000) form in a new window.
  3. In the External Applications form, click Add New Record.
  4. In the Type box, select the Exchange Online SMTP/IMAP/POP3 option.
  5. In the Application Name box, type the name of the application, for example, Office365 Connector.
  6. Switch to the browser tab with Microsoft Azure Portal and complete the steps in Register an application with the Microsoft identity platformn.
  7. On the Overview page of the registered application in the portal, copy the Application (client) ID value, and paste it into the Client ID box on the External Applications form.
  8. On the Overview page of the registered application in the portal, copy the Directory (tenant) ID value, and paste it into the Azure Tenant ID box on the System Email Accounts form.
  9. Switch to the browser tab with Microsoft Azure Portal, and complete the steps from Add a client secret for an application.
  10. On the Certificates and secrets page of the registered application in the portal, copy the client secret value, and paste it into theClient Secret box on the External Applications form.
  11. On the External Applications form, copy the value in the Return URL box.
  12. Switch to the browser tab with Microsoft Azure Portal, and complete the steps from Add a redirect URI.
  13. On the External Applications form, click Save and Close on the form toolbar. The system closes the window with the form and specifies the configured application in the External Application box on the System Email Accounts form.
  14. Switch to the browser tab with the Microsoft Azure Portal, and complete the steps from Application permission to Microsoft Graph to grant the following delegated permissions:
    • offline_access
    •  IMAP.AccessAsUser.All
    •  SMTP.Send
    •  POP.AccessAsUser.All if needed (however, using POP3 is not recommended in Acumatica ERP)

 

 

Step 4: To Configure Advanced Settings

Finally, you need to specify the advanced settings email account. Do the following:

  1. While you are still working with the account on the System Email Accounts (SM204002) form, switch to the Advanced Settings tab.
  2. In the Incoming server port (POP3/IMAP) box of the Server Port Numbers section, type the number of the port to be used for incoming mail.
  3. Select the Incoming server requires encrypted connection (SSL) check box.
  4. In the Outgoing server port (SMTP) box, type the number of the port to be used for outgoing mail.
  5. In the Outgoing server encrypted connection box, select the TLS option.
  6. On the form toolbar, click Save, and then click Sign In to test the settings of the email account.

 

 

Userlevel 4
Badge

We did get this login error again today.  We did use the same  information published above by Kfarren29 and got our email back up and working.  Had to change from Basic to Azure Modern Authentication.  

We currently have one tenant that has IMAP with Basic Authentication that is working and one that is not working with the same settings so we are unsure how to resolve this issue for our purposes.

Userlevel 4
Badge

@rkerby04 We had 2 tenants also and 2 completely different hosted environments, one on AWS and one hosted by Acumatica. Our IT provider enabled 2 factor authentication. It took several days to actually affect our email accounts. By turning that on, we had to update the email settings to use multi-factor and change them to Azure Modern Authentication.  Once we did that and signed into each email account again and tested the email account in the email accounts window, we were able to get it working.  There was one account not working and we had to go back into system email accounts and make sure the test button worked and resave the settings/password and test again.  Once we did that, all emails were working. 

Userlevel 4
Badge

@rkerby04 Also I believe the basic is ending in October so we thought it was best to change them all now since we were having issues anyway.  

@rkerby04 We had 2 tenants also and 2 completely different hosted environments, one on AWS and one hosted by Acumatica. Our IT provider enabled 2 factor authentication. It took several days to actually affect our email accounts. By turning that on, we had to update the email settings to use multi-factor and change them to Azure Modern Authentication.  Once we did that and signed into each email account again and tested the email account in the email accounts window, we were able to get it working.  There was one account not working and we had to go back into system email accounts and make sure the test button worked and resave the settings/password and test again.  Once we did that, all emails were working. 

We do not have multifactor authentication turned on for this particular email so I am unsure why one email would work and the other not work with the same settings and no multifactor authentication.  Did you have the multifactor authentication turned on for the email address?

@Kfarren29 

Hello, where did you find these permission in this step? I could not find it under Microsoft Graph?

 

Step 14

  1. Switch to the browser tab with the Microsoft Azure Portal, and complete the steps from Application permission to Microsoft Graph to grant the following delegated permissions:
    • offline_access
    •  IMAP.AccessAsUser.All
    •  SMTP.Send
    •  POP.AccessAsUser.All if needed (however, using POP3 is not recommended in Acumatica ERP)
Userlevel 2
Badge

@jvaliente51 The instructions say to choose Microsoft Graph and then select application permissions.  In reality, all of these are delegated permissions.  So the instructions should read

  1. Select Azure Active Directory > App registrations, and then select your client application.

  2. Select API permissions > Add a permission > Microsoft Graph > Delegated permissions.

If you then use the search box, you should see each of these.  The final result of my permissions settings is below:

 

I hope this helps!

Thanks @Kfarren29 ,

 

So far I was able to add the Graph Permission. However, i am not sure if this step is needed (see screenshot) as it may require IT approval. 

 

See Step 6

 

 

 

What I added

 

 

 

 

Without this as part of the permissions, I am getting this error upon signing in.

 

Thank you again!

 

Userlevel 2
Badge

@jvaliente51 You could certainly try to see if OAuth works in Acumatica without setting up these API permissions.  I included them because that was in the documentation I followed.  I didn’t have to worry about IT approval since I am a global Admin in our Office 365 tenant so I have full permissions.  I can’t say what permissions are required to be able to configure Microsoft Graph within Azure.

 

Best of luck!

@Kfarren29

Thank you! Ill give it a few more tries!

Userlevel 3
Badge +2

Hello, in v 20R2 we followed these steps and everything looks correct but we still get an authentication error. Has anyone managed to set this configuration in that release?

Are there any troubleshooting logs we can check to find out what is failing?

Userlevel 2
Badge

We are running Acumatica version 21.119.0030.  I never found an error log in Acumatica providing more detail on the issue.

 

At one point, I had a link to an diagnostic tool within Office 365 that would verify your connection.  Unfortunately, I haven’t been able to find that link to share it.  When I ran that with basic auth, I got the same error as I got with Acumatica.  I also got the same error when I tried to connect using basic auth via Windows Mail program.  That is the point at which I knew this wasn’t specific to Acumatica.  It was a general error related to basic auth and our Office 365 tenant.  So I never spent a lot of time trying to find more detailed error logs in Acumatica.

 

When I moved Acumatica to modern auth, it worked right away.  But again, I was using the 2021 R2.

Userlevel 3
Badge +2

Thank you Kfarren29

Were you using a specific account or a shared inbox?
We are using a shared inbox and I suspect that is what causes the error. Because we sign in with a user account that has delegate permissions over that inbox but has a different email address.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved