Using OAuth 2.0 with Sage 100
Description

From Sage 100 Help regarding configuring E-mail settings in Company Maintenance:

E-mail

Authentication Method

  • Select an authentication method.
    • Basic authentication requires the use of a user name and password.
      • If you select Basic, 25 is the default value in the Port field.
    • OAuth (Open Authorization) is an open standard authorization protocol used to grant access using access tokens instead of sharing a user name and password.
      • If you're going to use the OAuth method, you will need to obtain your OAuth client credentials from your authenticating application, such as Microsoft or Google.
      • If you select OAuth, 587 is the default value in the Port field and TLS is the default SMTP Encryption type.
      • Resources for learning more about OAuth
        • OAuth.net
        • Using OAuth 2.0 to Access Google APIs: https://developers.google.com/identity/protocols/oauth2

Address
Type the DNS address or IP address of the SMTP e-mail server.

Port
Type the port ID that the SMTP e-mail server is using if it is not using the default port.
If you selected Basic as the authentication method, the default port is 25. If you selected OAuth, the default port is 587 and the default Encryption is TLS.

SMTP Encryption
Select the type of encryption to use between the SMTP client and SMTP server when sending e-mail.

  • Select None for no encryption. This is traditionally offered on port ID 25.
  • Select SSL (sometimes called Implicit SSL) to encrypt the communication for the entire session. This is normally offered on port ID 465.
  • Select TLS (sometimes called Explicit SSL) to begin the communication unencrypted, and then the client issues a STARTTLS command to start using encryption before authenticating and sending the e-mail. This can be offered on a variety of ports including port ID 25, 443, or 587.
    • If you selected OAuth as the authentication method, the default selection is TLS, but it can be changed.

User ID
Type the user ID to use to log on to the SMTP e-mail server.

Domain
If a domain name is required by your SMTP server, type the domain name.
This field is available if Basic is selected in the Authentication Method field.

Password
Type the user ID password to log on to the SMTP e-mail server.
This field is available if Basic is selected in the Authentication Method field.

Confirm Password
Retype the user ID password to confirm the password.
This field is available if Basic is selected in the Authentication Method field.

Client ID
Enter the client ID that will identify the application to the OAuth service.
This field is available if OAuth is selected in the Authentication Method field.

Client Secret
Enter the client secret for the application on the OAuth service.
This field is available if OAuth is selected in the Authentication Method field.

Auth End Point
Enter the URL provided by the OAuth service that is used to obtain an authorization grant.
This field is available if OAuth is selected in the Authentication Method field.

Token End Point
Enter the URL provided by the OAuth service for exchanging an authorization grant for an access token.
This field is available if OAuth is selected in the Authentication Method field.

Scope
Enter the scope of access as required by the OAuth service. If you're entering multiple scopes, separate them with a space.
Examples
This field is available if OAuth is selected in the Authentication Method field.

Redirect URL
Enter the callback URL.
Leaving this field blank or entering http://localhost will work for most OAuth services.
For OAuth services that do not allow http://localhost:port callback URLs, enter a URI on your web server that is configured to send a response to redirect back to http://localhost:3017.
This field is available if OAuth is selected in the Authentication Method field.

Redirect Port
If the OAuth service requires that a specific port be used to listen for the redirect URI request, enter the port number here.
If the OAuth service does not require a specific port, enter 0 (zero). A random port will be used.
This field is available if OAuth is selected in the Authentication Method field.

Code Challenge Method
Select the option specified in the OAuth service requirements.
This field is available if OAuth is selected in the Authentication Method field.

Use 128-bit Encryption for Password Protected Documents
Select this check box to use the 128-bit encryption when password-protected documents are e-mailed. Clear this check box if you do not want to use encryption for e-mails.

Cause
Resolution
[BCB:5:Third-party support:ECB]

Note: Sage Customer Support cannot assist setting up OAuth Authentication to connect to various SMTP Mail Servers.

This information is provided to assist Sage 100 Business Partners or Customers familiar with the SMTP (Mail) Server being used.

While Sage cannot provide guidance for all SMTP Server configurations, the following is an example, and to be used as guidance, on how to connect Sage 100 to Gmail using OAuth 2.0

Please consult with your Sage 100 Business Partner or Sage City if you are not familiar with SMTP (Mail) Server setup.

* A minimum of Sage 100 2022.1 or Sage 100 2021.4 must be installed and if using Advanced or Premium, LM7101T (2022.1) or LM7012T (2021.4) must also be installed. Sage 100 2022.2 and Sage 100 2021.5 include these hotfixes.

Note: .NET 4.8 is also required . See link in related resources to determine if .NET 4.8 is installed

How to connect Sage 100 to Gmail using OAuth 2.0

  • Open Company Maintenance and select Company Code
  • SMTP (Mail) Server - Authentication Method = OAuth
  • Address = smtp.gmail.com
  • Port = 587
  • SMTP Encryption = TLS
  • User ID = User's Gmail email address
  • Client ID = Client ID obtained from Google Cloud Platform
  • Client Secret = Client Secret obtained from Google Cloud Platform
  • Auth End Point = https://accounts.google.com/o/oauth2/auth
  • Token End Point = https://oauth2.googleapis.com/token
  • Scope = https://mail.google.com/
  • Redirect URI = http://localhost
  • Redirect Port = 3017
  • Code Challenge Method = None
  • Select 128-bit Encryption for Password Protected Documents if 128-bit encryption is desired when password-protected documents are e-mailed
DocLink: How to configure Sage 100 OAuth E-mail settings for use with a Microsoft 365 App Registration
DocLink: Will Sage 100 lose ability to send emails thru Paperless Office once Microsoft disables Basic Authentication
DocLink: How to determine if .NET 4.8 is installed on workstation
Defect ID
Steps to duplicate
Related Articles