Dynamics365 - Connection Settings

Used by most of Microsoft Dynamics 365 applications

Connect using Azure AD

1 - Define an App in Azure and get your oAuth values

Use the values defined in the Dynamics365 App Registration to get the OAuth client id and secret

2 - Get the OAuth Access Token in appRules

2.1 - Standard oAuth Flow

Use Getting the oAuth Access and Refresh Tokensin order to get the proper connection properties

2.2 - Client OAuth Flow

Client credentials refers to a flow in OAuth where there is no direct user authentication taking place. Instead, credentials are created for just the app itself. All tasks taken by the app are done without a default user context. This makes the authentication flow a bit different from standard.

All permissions related to the client oauth flow require admin consent.

In your App Registration in portal.azure.com, navigate to API Permissions and select the Microsoft Graph permissions. There are two distinct sets of permissions - Delegated and Application permissions. The permissions used during client credential authentication are under Application Permissions. Select the applicable permissions you require for your integration.

In addition to setting the standard OAuth client id and secret, to use client credentials you must also set the following connection properties:

  • OAuthGrantType: Set this to CLIENT.

  • AzureTenant: Set this to the tenant you wish to connect to.

When you authenticate using client credentials, there is no Web flow. Authentication with client credentials will take place automatically like any other connection, except there will be no window opened prompting the user. Because there is no user context, there is no need for a browser popup. Connections will take place and be handled internally.

Connect using MSI Authentication

If you are running the source on an Azure VM, you can leverage Managed Service Identity (MSI) credentials to connect:

  • AuthScheme: Set this to AzureMSI.

The MSI credentials will then be automatically obtained for authentication.

Last updated