bvstone

Using MAILTOOL With Office 365 and Two Factor Authentication (2FA or MFA)

Posted:

Using MAILTOOL With Office 365 and Two Factor Authentication (2FA or MFA)

I recently had a customer ask me how MAILTOOL would work for sending emails from their IBM i if they turned on Two Factor Authentication (2FA/MFA) for their Office 365 account.  I hadn't really been asked this before so I looked into it, and turned it on in my personal account to test.  

Setting Up MFA For Office 365

You can find instructions for setting up MFA for your Office 365 account in this Microsoft Article.  Once set up, you should be presented with an application password that you should keep track of.  When I was setting up my account this application password was presented after turning it on.  From other articles I have read, this password is to be used in place of your normal account password for applications like SMTP/Email when you are not using OAuth 2.0 authentication with your email client (for example, GreenTools for Microsoft Apps (G4MS)),

Sending Email with MAILTOOL using Office 365 and MFA

This is actually quite a simple change after enabling MFA.  I found that all I needed to do was update the password I was using on the MAILTOOL command (either on the command or in a MAILTOOL configuration file) and the email was immediately accepted.  I did read that others were having issues using this method with other email clients on other systems, but it worked without a hitch on the IBM i to send emails.

Send Email with GreenTools for Microsoft Apps (G4MS)

Out of curiosity I also tried to send an email using the Send Email addon for GreenTools for Microsoft Apps (G4MS) which takes advantage of Microsoft's OAuth 2.0 authentication process (a much more secure process than standard user and password authentication)  I was greeted with an "invalid grant" error as I expected.

To solve this problem all I needed to do was to re-register the *OFFICE365SMTP service using the G4MSREGSVC command (making sure to specify REDO(*YES) on the command if the account is already set up).  Once that process was complete sending emails using G4MS was again painless and secure.

Conclusion

So, it seems that setting up MFA for Office 365 accounts works without much issue for any of the email offerings we have at BVSTools.  It does require a little update on your IBM i depending on the method that you are are using to send emails (ie, SMTP server using MAILTOOL or Microsoft's RESTful email API used by G4MS) but once done things should function as they did before.  

As always, feel free to contact us with any questions or concerns.

 




Latest Posts:

What Objects Should I Omit from Replication to Ensure My License Keys Work on my HA/DR System? What Objects Should I Omit from Replication to Ensure My License Keys Work on my HA/DR System?
Posted by June 27, 2022
BVSTools >> BVSTools Software Discussion
GreenTools for Google Apps (G4G) v15.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page GreenTools for Google Apps (G4G) v15.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page
Posted by May 3, 2022
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
How Do I Switch From MAILTOOL Plus to GreenTools for Google or Microsoft Office 365? How Do I Switch From MAILTOOL Plus to GreenTools for Google or Microsoft Office 365?
Posted by April 18, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
PTFs Issued for SSL/TLS Issues PTFs Issued for SSL/TLS Issues
Posted by March 12, 2022
IBM Power Systems >> PTF Watch
Google Dropping Support for Google Dropping Support for "Less Secure Apps" May 30th, 2022. What Does This Mean for Your IBM i Email?
Posted by March 4, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Have You Installed a New Version of MAILTOOL and Now Things Are Acting Different?  Check the Command Defaults! Have You Installed a New Version of MAILTOOL and Now Things Are Acting Different? Check the Command Defaults!
Posted by February 28, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Using MAILTOOL Plus on V7R1, or Any OS Using TLS 1.1 or Older Using MAILTOOL Plus on V7R1, or Any OS Using TLS 1.1 or Older
Posted by January 27, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
BVSTools ILE Functions Being Updated to Remove Hashtag (#) from Function Names BVSTools ILE Functions Being Updated to Remove Hashtag (#) from Function Names
Posted by December 30, 2021
BVSTools >> BVSTools Announcements
GETURI v12.00 Released Removing Beginning # (Hashtag) From Function Names GETURI v12.00 Released Removing Beginning # (Hashtag) From Function Names
Posted by December 28, 2021
BVSTools >> BVSTools Announcements >> Get URI (GETURI) Specific Announcements
Is any of BVSTools Software Affected by the log4j exploit? Is any of BVSTools Software Affected by the log4j exploit?
Posted by December 20, 2021
BVSTools >> BVSTools Software Discussion
GreenTools for Microsoft Apps (G4MS) Updated to Allow Downloads, Deletes, and Sharing of Files GreenTools for Microsoft Apps (G4MS) Updated to Allow Downloads, Deletes, and Sharing of Files
Posted by December 17, 2021
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
SSL Handshake Errors with GETURI, MAILTOOL and GreenTools Products SSL Handshake Errors with GETURI, MAILTOOL and GreenTools Products
Posted by October 18, 2021
BVSTools >> BVSTools Software Discussion
MAILTOOL Updated to Retry Sending when GSK SSL Handshake Error 415 (GSK_ERROR_BAD_PEER) is Encountered MAILTOOL Updated to Retry Sending when GSK SSL Handshake Error 415 (GSK_ERROR_BAD_PEER) is Encountered
Posted by August 19, 2021
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
MAILTOOL Updated to Allow List-Unsubscribe and User Defined Headers MAILTOOL Updated to Allow List-Unsubscribe and User Defined Headers
Posted by August 13, 2021
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
AWS signing process in as400 AWS signing process in as400
Posted by August 13, 2021
Programming >> Web Programming

Reply




Copyright 1983-2020 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).