OAuth 2.0 support for email service providers

In an on-premises environment, you can set up custom service providers and services that use OAuth2 authentication. You can define providers and services for Microsoft 365 (O365) and Microsoft Graph.
Note: Currently, Gmail is not supported.

Obtaining OAuth2 credentials

To define service providers that use OAuth2.0 authentication, you need this information for O365 and MicrosoftGraph:

  • Oauth2 ClientID
  • Oauth2 ClientSecret
  • Oauth2 Scopes
  • Oauth2 tenantID

You can obtain the OAuth 2.0 credentials from the Azure portal at https://portal.azure.com/auth/login/.

Note: The OAuth 2.0 tenant ID refers to the Microsoft Entra ID, not the Infor tenant ID.

For more information, see https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id.

Configuring O365 in LN

Creating the OAuth 2.0 parameter set

  1. Start the OAuth 2.0 Parameter Sets (ttaad0108m000) session.
  2. Add a parameter set with this information:
    • Parameter Set : Specify a name, for example, PARAM_O365.
    • Grant Type : Client Credentials .
    • Access Token URL : https://login.microsoftonline.com/<Oauth2 tenantID>/oauth2/v2.0/token.

      Note: <Oauth2 tenantID> is the tenant ID you obtained from the Azure portal.

    • Client Authentication : As Basic Auth Header .
    • Specify the OAuth2 information in these fields:
      • Scope .
      • Client ID .
      • Client Secret .

Creating the service provider

  1. Start the Service Providers (ttcmf0110m000) session.
  2. Add a service provider with this information:
    • Provider : Specify a name, for example, OAUTH2_O365.
    • 4GL Connector : ttcmfcurlsmtp.
  3. Select the new provider and click Parameters . The Provider Parameters (ttcmf0120m000) session is started.
  4. On the Actions menu, select Generate OAUTH2 properties .

    This question is displayed: Parameters have already been assigned to this provider. Do you want to overwrite?

  5. In the question window, click Yes.
  6. Specify this information:
    • 11 host: smtp.office365.com.
    • 12 port: 587.
    • 13 connectionTimeout: 60.
    • 14 fromEmail: Specify your email address.
    • 15 useSSL: Yes.
    • 16 user: Your user account (UPN).
    • 18 dateInHeader: Yes.
    • 19 startTLS: Yes.
    • 20 type: Specify the name of the provider in initial caps, for example, Oauth2_o365.
    • 21 fromDisplayName: Specify a name.
    • 23 authenticationType: OAUTH2.
    • 24 ParameterSet: Specify the name of the parameter set you created for O365, for example, PARAM_O365.
    • 25 externalTenantId: Specify the Oauth2 tenantID that you obtained from the Azure portal.
    • 26 oauth2.provider: O365.

Creating the service

  1. Start the Services (ttcmf0130m000) session.
  2. Add a service with this information:
    • Service Name : Specify a name that exactly matches the name of the provider you just created, for example, OAUTH2_O365.
    • Provider : Select the provider you just created, for example, OAUTH2_O365.
    • Enabled : Yes.
    • Logging : Yes.
    • Message Storage Path : ${BSE}/tmp/outbox.
    • File Type : PDF.

Configuring Microsoft Graph in LN

Creating the OAuth 2.0 parameter set

  1. Start the OAuth 2.0 Parameter Sets (ttaad0108m000) session.
  2. Add a parameter set with this information:
    • Parameter Set : Specify a name, for example, PARAM_MSGRAPH.
    • Grant Type : Client Credentials .
    • Access Token URL : https://login.microsoftonline.com/<Oauth2 tenantID>/oauth2/v2.0/token.

      Note: <Oauth2 tenantID> is the tenant ID you obtained from the Azure portal.

    • Client Authentication : As Basic Auth Header .
    • Specify the OAuth2 information in these fields:
      • Scope .
      • Client ID .
      • Client Secret .

Creating the service provider

  1. Start the Service Providers (ttcmf0110m000) session.
  2. Add a service provider with this information:
    • Provider : Specify a name, for example, OAUTH2_MSGRAPH.
    • 4GL Connector : ttcmfcurlsmtp.
  3. Select the new provider and click Parameters . The Provider Parameters (ttcmf0120m000) session is started.
  4. On the Actions menu, select Generate OAUTH2 properties .

    This question is displayed: Parameters have already been assigned to this provider. Do you want to overwrite?

  5. In the question window, click Yes.
  6. Specify this information:
    • 11 host: Is not used. Specify, for example, do.not.care.not.used.
    • 12 port: 587.
    • 13 connectionTimeout: 60.
    • 14 fromEmail: Specify your email address.
    • 15 useSSL: No (is not used; Microsoft Graph uses HTTP).
    • 16 user: Is not used. Specify, for example, your own email address.
    • 18 dateInHeader: Yes.
    • 19 startTLS: No (is not used; Microsoft Graph uses HTTP).
    • 20 type: Specify the name of the provider in initial caps, for example, Oauth2_msgraph.
    • 21 fromDisplayName: Specify a name.
    • 23 authenticationType: OAUTH2.
    • 24 ParameterSet: Specify the name of the parameter set you created for MSGRAPH, for example, PARAM_MSGRAPH.
    • 25 externalTenantId: Specify the Oauth2 tenantID that you obtained from the Azure portal.
    • 26 oauth2.provider: MICROSOFTGRAPH.

Creating the service

  1. Start the Services (ttcmf0130m000) session.
  2. Add a service with this information:
    • Service Name : Specify a name that exactly matches the name of the provider you just created, for example, OAUTH2_MSGRAPH.
    • Provider : Select the provider you just created, for example, OAUTH2_MSGRAPH.
    • Enabled : Yes.
    • Logging : Yes.
    • Message Storage Path : ${BSE}/tmp/outbox.
    • File Type : PDF.