Dynamics 365 OAuth2 Account for Online

Overview

Use this account type to connect Microsoft Dynamics 365 for Sales Snaps with data sources that use OAuth2 with Dynamics 365. This account supports both on-premise and cloud instances.
Dynamics 365 OAuth2 Account for Online

Prerequisites

  • A valid application with all the required API permissions in the Azure Portal.
  • A valid client ID and client secret.

Account settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description
Label

String
Required. Specify a unique label for the account.

Default value: N/A

Example: Dynamics 365 OAuth2 Account for Online

Dynamics Organization URL

String/Expression
Required. Specify the URL of your Dynamics 365 for Sales organization instance.

Default value: N/A

Example: https://abcxyzcompany.api.crm.dynamics.com/api/data/v8.2/

Client ID

String
Required. Specify the client ID associated with your Azure application. You can create the client ID as advised by your application provider.

Default value: N/A

Example: 9ee09921-7b72-432d-b552-a21e8a1ab143

Client Secret

String
Specify the client secret associated with your account. You can create the client secret as advised by your application provider.

Default value: N/A

Example: bec1f9242f9nsh67f2276b9ws4cadd14

Access Token

String
Auto-generated after authorization. Specify the access token associated with the Azure portal application, used to make API requests on behalf of the user associated with the client ID.

Default value: N/A

Example: 768901

Refresh Token

String
Auto-generated after authorization. Specify the refresh token associated with your account. If the refresh token is stored, the access token can be refreshed automatically before it expires.

Default value: N/A

Example: 87566779

Access Token Expiration

Integer
Specify the access token expiration value.

Default value: N/A

Example: 20

Header Authenticated

Checkbox
Select this checkbox to indicate that the endpoint uses bearer header authentication.

Default value: Deselected

OAuth2 Endpoint

String
Required. Specify the URL of the endpoint that authorizes the application.

Default value: https://login.microsoftonline.com/<tenant>/oauth2/authorize

Example: https://login.microsoftonline.com/yourcompany.onmicrosoft.com/oauth2/authorize

OAuth2 Token

String
Required. Specify the URL of the endpoint that retrieves the token for an authenticated account.

Default value: https://login.microsoftonline.com/<tenant>/oauth2/token

Example: https://login.microsoftonline.com/yourcompany.onmicrosoft.com/oauth2/token

Grant Type

Dropdown list
Select the grant type for authorization. Available options are:
  • authorization_code: Authenticates using credentials that return to the client through a redirect URL. The application receives the authorization code from the URL and uses it to request an access token.
  • client_credentials: Obtains an access token for the client ID and client secret through the token endpoint URL.
  • password: Obtains an access token using the Username and Password.
    Note: We recommend this grant type only if your organization authenticates users on an on-premise Dynamics 365 for Sales instance through this MFA-incompatible mode.

Default value: authorization_code

Example: client_credentials

Username

String
Appears when you select password as the Grant Type. Specify the username for the account to connect to the Dynamics 365 for Sales instance.

Default value: N/A

Example: admin

Password

String
Appears when you select password as the Grant Type. Specify the password for the account to connect to the Dynamics 365 for Sales instance.

Default value: N/A

Example: p@$$w019

Token Endpoint Config Use this fieldset to provide custom properties for the OAuth2 token endpoint.
Token Endpoint Parameter

String
Required. Specify the token endpoint parameter.

Default value: N/A

Example: response-type

Token Endpoint Parameter Value

String
Required. Specify the value associated with the endpoint parameter defined above.

Default value: N/A

Example: code

Auth Endpoint Config Use this fieldset to provide custom properties for the OAuth2 auth endpoint.
Authentication Parameter

String
Required. Specify the authorization endpoint parameter.

Default value: N/A

Example: scope

Authentication Parameter Value

String
Required. Specify the value associated with the authorization endpoint parameter defined above.

Default value: N/A

Example: offline_access app.Read.All

Snaplex

String
Specify the Snaplex to process OAuth 2.0 authorization and refresh token requests. The format for the Snaplex value is: /{org}/{plexPath}.

When you configure the Snaplex, that specific Snaplex is used when obtaining or refreshing OAuth2 tokens. If you do not specify a value, the control plane selects a Snaplex from the available Snaplexes and prefers Cloudplexes over Groundplexes.

This setting is useful when a specific Snaplex must be used, such as when the OAuth2 server can only be accessed by a Snaplex within an organization's private network.

Default value: N/A

Example: /MyOrg/shared/MyPlex

Auto-Refresh Token

Checkbox
Select this checkbox to automatically refresh the token using the refresh token when the token is due to expire.

Default value: Deselected

Authorize Click this button to acquire the required permissions for this account from the Azure portal application. For existing accounts, click this button to re-acquire the permissions to ensure that the account works as expected.
Note: Click Validate after entering the required details to ensure that all fields have been filled accurately. Click Apply to save the settings.

Configure a Microsoft Dynamics 365 OAuth2 Account in the SnapLogic IIP Designer

Learn how to Configure an Application in the Azure Portal for OAuth2 Account.