Microsoft O365 email and OAuth setup in Paperless Office

SOLVED

Sage recently announced that Paperless Email will stop working for Office 365 users on October 1, 2022 (due to a notice from Microsoft about disabling Basic authentication for their email services).  It certainly is welcome to get such a proactive notification, but I'm having a hard time finding details on how to set this up.

(We don't do email support, so the steps to configure this are beyond our visibility... mainly: what to tell customers / their IT about what's required from an email administration perspective).

KB 115141 has some general instructions, with detailed settings for Gmail, but nothing for Microsoft / O365. 

  • Can this article be updated to include an example of Microsoft specific settings? 
  • Does anyone have experiences to share on OAuth setup with O365 email?
Parents
  • 0

    Hi Kevin, we will be adding this information regarding Microsoft specific settings to the KB.
    Thank you
    Bret

    Configuring Sage 100 OAuth email settings for use with a Microsoft 365 App Registration. 

     First, if not yet completed, create the app registration.  

    1. Logon to your Microsoft Azure Portal account (portal.azure.com) as the admin user.
    2. Go to Azure Active Directory / App Registrations and click New Registration.
    • Enter the Display Name: (user-defined) 
    • Select Who can use: Single tenant 
    • Enter the Redirect URI: (Platform = Public client/native) https://localhost 
    1. Click Register.
    2. Tip: copy the Application (client) Id and save it for later reference.
    3. Tip: click Endpoints and copy the Authorization endpoint (v2) and the Token endpoint (v2) for later use. Then Close Endpoints.
    4. Click API permissions / Add a permission / Select Microsoft Graph and then Delegated Permissions.
    5. Select the offline_access and SMPT.Send permissions and then click Add permissions. 

    There should be 3 permissions at this point: offline_access, SMTP.Send, User.Read.  

    1. Click Grant admin consent for (user) for these permissions. 

    The new app registration should now be ready for use.  

    Next, if not already done, verify the SMTP setting in the Microsoft 365 Admin Center.  

    1. Logon to www.office.com as the admin user.
    2. Type admin in the search field and select the Admin app in the search results.
    3. In the Admin Center, click Users / Active Users and select the admin user used to create the App Registration.
    4. Click Mail / Manage email apps.
    5. Make sure the "Authenticated SMTP" checkbox is checked and save changes. 

    Now in Sage 100 Company Maintenance, on the Email tab, select the OAuth Authentication Method.  

    1. Enter the Address: smtp.office365.com
    2. Accept default Port: 587
    3. Accept default SMTP Encryption: TLS
    4. Enter your User ID: (the email/admin user used to create the App Registration)
    5. Enter the Client ID for this app registration.
    6. The Client Secret is not required for Microsoft 365.
    7. Enter the Auth endpoint for this app registration.
    8. Enter the Token endpoint for this app registration.
    9. Enter the Scope: outlook.office.com/SMTP.Send offline_access
    10. Enter the Redirect URL used above: https://localhost
    11. Accept the default Code Challenge Method: S265
    12. Click Accept to save the company record and then click Test Email to initiate the authentication process. 
    • On the initial auth process, a user interface is launched where you will be prompted for the user and password. After that the system will use a token and a refresh token to send SMTP emails without user interaction.  
    • This will continue if emails are sent from the company at least every 90 days.  
    • However, after 90 days of inactivity, the refresh token will expire which will cause the UI to launch again, stopping the email send, and require the user and password.  
    • Note: This refresh token expiration is specific to Microsoft 365 and may vary with other providers.  

     

    Creating an Alias username in the Microsoft 365 Admin Center to use as the friendly-from email address in Sage 100 Paperless Office Forms Electronic Delivery Options.  

    1. Logon to www.Office.com as the admin user.
    2. Type admin in the search field and select the Admin app in the search results.
    3. In the Admin Center, click Users / Active Users and select the admin user used to create the App Registration.
    4. On the Account tab click Manage username and email.
    5. Enter an Alias Username and click Add and then click Save changes. 
    • In Sage 100 go to Paperless Office / Setup / Form Maintenance. 
    • Select the desired form printing setting and enter the alias username (email address) in the From E-mail Address field. 
    • Note: Don’t use the alias username in the email settings in Company Maintenance. This must be the primary username used to authenticate the App Registration. 

     

Reply
  • 0

    Hi Kevin, we will be adding this information regarding Microsoft specific settings to the KB.
    Thank you
    Bret

    Configuring Sage 100 OAuth email settings for use with a Microsoft 365 App Registration. 

     First, if not yet completed, create the app registration.  

    1. Logon to your Microsoft Azure Portal account (portal.azure.com) as the admin user.
    2. Go to Azure Active Directory / App Registrations and click New Registration.
    • Enter the Display Name: (user-defined) 
    • Select Who can use: Single tenant 
    • Enter the Redirect URI: (Platform = Public client/native) https://localhost 
    1. Click Register.
    2. Tip: copy the Application (client) Id and save it for later reference.
    3. Tip: click Endpoints and copy the Authorization endpoint (v2) and the Token endpoint (v2) for later use. Then Close Endpoints.
    4. Click API permissions / Add a permission / Select Microsoft Graph and then Delegated Permissions.
    5. Select the offline_access and SMPT.Send permissions and then click Add permissions. 

    There should be 3 permissions at this point: offline_access, SMTP.Send, User.Read.  

    1. Click Grant admin consent for (user) for these permissions. 

    The new app registration should now be ready for use.  

    Next, if not already done, verify the SMTP setting in the Microsoft 365 Admin Center.  

    1. Logon to www.office.com as the admin user.
    2. Type admin in the search field and select the Admin app in the search results.
    3. In the Admin Center, click Users / Active Users and select the admin user used to create the App Registration.
    4. Click Mail / Manage email apps.
    5. Make sure the "Authenticated SMTP" checkbox is checked and save changes. 

    Now in Sage 100 Company Maintenance, on the Email tab, select the OAuth Authentication Method.  

    1. Enter the Address: smtp.office365.com
    2. Accept default Port: 587
    3. Accept default SMTP Encryption: TLS
    4. Enter your User ID: (the email/admin user used to create the App Registration)
    5. Enter the Client ID for this app registration.
    6. The Client Secret is not required for Microsoft 365.
    7. Enter the Auth endpoint for this app registration.
    8. Enter the Token endpoint for this app registration.
    9. Enter the Scope: outlook.office.com/SMTP.Send offline_access
    10. Enter the Redirect URL used above: https://localhost
    11. Accept the default Code Challenge Method: S265
    12. Click Accept to save the company record and then click Test Email to initiate the authentication process. 
    • On the initial auth process, a user interface is launched where you will be prompted for the user and password. After that the system will use a token and a refresh token to send SMTP emails without user interaction.  
    • This will continue if emails are sent from the company at least every 90 days.  
    • However, after 90 days of inactivity, the refresh token will expire which will cause the UI to launch again, stopping the email send, and require the user and password.  
    • Note: This refresh token expiration is specific to Microsoft 365 and may vary with other providers.  

     

    Creating an Alias username in the Microsoft 365 Admin Center to use as the friendly-from email address in Sage 100 Paperless Office Forms Electronic Delivery Options.  

    1. Logon to www.Office.com as the admin user.
    2. Type admin in the search field and select the Admin app in the search results.
    3. In the Admin Center, click Users / Active Users and select the admin user used to create the App Registration.
    4. On the Account tab click Manage username and email.
    5. Enter an Alias Username and click Add and then click Save changes. 
    • In Sage 100 go to Paperless Office / Setup / Form Maintenance. 
    • Select the desired form printing setting and enter the alias username (email address) in the From E-mail Address field. 
    • Note: Don’t use the alias username in the email settings in Company Maintenance. This must be the primary username used to authenticate the App Registration. 

     

Children