To Create a System Email Account for Office 365 with OAuth 2.0

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

Tip: MYOB Advanced 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.
Attention: This topic describes the configuration of a third-party software. Please note the following points:
  • The procedure below is designed for the most common usage scenarios. If you are implementing a more complicated scenario and you encounter difficulties, contact MYOB Advanced Support.
  • The vendor of the third-party software may change the user interface and settings. Therefore, the form elements and setting names you see may differ from the ones described in the procedure.
  • The procedure will be updated each time information is made available about new common scenarios and changes in the user interface and settings.

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 Service 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.
    Note: If you have selected IMAP, every email that has been successfully collected from the server will be marked as read on the server.

    If 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.

  3. In the Incoming Mail Server box, type outlook.office365.com.
  4. In the Outgoing Mail Server box, type outlook.office365.com.
  5. 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 OAuth2 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 platform.
  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 MYOB Advanced)

Step 4: To Configure Port Numbers

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, configure port numbers in the Server Port Numbers section of the Service 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.