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.
Page 1 / 2
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:
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
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!
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:
In the Summary area of the form, do the following:
In the Account Name box, type the name of the system email account.
In the Email Address box, type the email address of the account that will be used as the system email account.
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:
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.
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.
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.
In the Incoming Mail Server box, type <tt>outlook.office365.com</tt>.
In the Outgoing Mail Server box, type <tt>outlook.office365.com</tt>.
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:
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.
Click the pencil icon next to the External Application box. The system opens the External Applications (SM301000) form in a new window.
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.
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.
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.
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.
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:
While you are still working with the account on the System Email Accounts (SM204002) form, switch to the Advanced Settings tab.
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.
Select the Incoming server requires encrypted connection (SSL) check box.
In the Outgoing server port (SMTP) box, type the number of the port to be used for outgoing mail.
In the Outgoing server encrypted connection box, select the TLS option.
On the form toolbar, click Save, and then click Sign In to test the settings of the email account.
You are correct that you need a separate external application record in Acumatica for each email however you only need one registered application in Azure for your organization. Each External Application record in Acumatica can use the same client/tenant IDs from Azure as well as secret value, Not sure that is the total problem but I know you don’t need multiple applications in Azure.
As far as better documentation, I’ve used that same document you attached multiple times at multiple clients and was successful with setup.
This will allow you to verify if it is an Office 365 configuration or account issues versus an Acumatica issue.
@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!
@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
Select Azure Active Directory > App registrations, and then select your client application.
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!
@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 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.
@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.
You are correct that you need a separate external application record in Acumatica for each email however you only need one registered application in Azure for your organization. Each External Application record in Acumatica can use the same client/tenant IDs from Azure as well as secret value, Not sure that is the total problem but I know you don’t need multiple applications in Azure.
As far as better documentation, I’ve used that same document you attached multiple times at multiple clients and was successful with setup.
Good luck!
Thanks for the clarification, that makes a lot more sense to me. After updating my configuration, everything appears to be working.
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.
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 @Chris Hackett I have not solved this issue, at that time we went for GMail instead Outlook and it was working for us.
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.
@Kfarren29
Thank you! Ill give it a few more tries!
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.
Were you able to fix this problem? I am getting it and cannot seem to fix it even following the above instructions
I am running into problems setting up three email inboxes in our Acumatica tenant. It appears as though I need to add an external application record for each email address? I have also created an application for each email address in the Azure portal. The instructions that I have been provided from my VAR seem outdated and incomplete (see attached). When I try and authenticate (ie: sign in), it appears as though the subsequent accounts that I have added appear to be trying to use the first account credentials some how. Is there an updated documentation resource that better outlines the procedure of setting up Office 365 IMAP access with OAuth (modern authentication)? Something isn’t right here and I feel like I have thoroughly reviewed everything that I can think of. Admittedly I have less than one business days worth of experience setting up Acumatica.
We are getting this issue now but the emails are still being sent and no incoming processing has been configured… other than moving to modern auth was there ever a resolution on this?
We have a dedicated, licensed user in Office 365 for our Acumatica email address. I would definitely try to see if authorizing via a licensed user account resolves the issue (versus a shared mailbox). That should be a fairly simple test to run.
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.
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
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?
Hi @Naveen B were you ever able to resolve this issue? Thanks!