Skip to main content

Configuring an ADF Linked Service Connection for Dynamics CRM

note

For information on how to enable a connection for use with linked services, see Configuring a Linked Service Connection.

note

Field labels in this walkthrough follow the underlying Azure Data Factory property names, with the connection column that carries each value named alongside. The exact labels shown in the BimlFlex Connection Editor may differ.

After selecting Dynamics CRM from the Linked Service Type dropdown, the form required for creating a Dynamics CRM Linked Service will appear.

Source Only Connector​

A Dynamics CRM connection is used as a source. It is not available as a target.

Dynamics CRM and Dynamics 365 connections share the Dynamics CRM System Type, and the Linked Service Type selected in this form is what tells the two apart.

Choosing an Authentication Method​

MethodCredentialsAdditional Settings
AAD Service PrincipalService Principal Id and Service Principal KeyNone
Office365Username and PasswordNone

Recommendation: Use AAD Service Principal and store the Service Principal Key in Azure Key Vault rather than entering it as plaintext.

Complete Example: AAD Service Principal with Azure Key Vault​

FieldExample Value
Connect via Integration RuntimeAutoResolveIntegrationRuntime
Deployment TypeOnline
Service Urihttps://contoso.crm.dynamics.com
Authentication MethodAAD Service Principal
Service Principal Id<client-id-of-app-registration>
Azure Key Vault Linked Servicebfx-kv
Secret Name (for Service Principal Key)BFX-SRC-DynamicsCrmClientSecret

Required Fields​

Common Required Fields

Most required fields for a Dynamics CRM Linked Service connection depend on the Authentication Method used. There are some fields that are required regardless of Authentication Method.

These common required fields are:

Authentication Method Dependent Required Fields

The remaining field requirements are dependent on Authentication Method.

Required fields for AAD Service Principal:

Required fields for Office365:

Connect via Integration Runtime​

Connect via Integration Runtime names the integration runtime for a Dynamics CRM Linked Service connection. The default value is AutoResolveIntegrationRuntime. To use another runtime, select it from the dropdown or choose + New to add one. When a custom value is saved in the linked service form, it will be added to the custom integration runtimes. The custom values that appear in this dropdown can be maintained in Settings under Azure - AzureIntegrationRuntime.

Deployment Type​

The Deployment Type is stored in the connection's LS_DeploymentType column and maps to the ADF deploymentType property. Set it to Online, the deployment type that the AAD Service Principal and Office365 methods apply to.

Service Uri​

The Service Uri is the address of the Dynamics CRM instance, the same one used to open it in a browser (for example, https://contoso.crm.dynamics.com). It is stored in the connection's LS_ServiceUri column and maps to the ADF serviceUri property.

Authentication Method​

The Authentication Method is stored in the connection's LS_AuthenticationMethod column and maps to the ADF authenticationType property, written without spaces. The Dynamics CRM Linked Service connection can use AAD Service Principal or Office365 authentication.

For AAD Service Principal, a Service Principal Id and Service Principal Key are required.

For Office365, a Username and Password are required.

AAD Service Principal​

AAD Service Principal authentication signs in with a Microsoft Entra application, and BimlFlex writes the Authentication Type AADServicePrincipal.

The Service Principal Id supplies the client ID of the application and is stored in the connection's LS_ServicePrincipalId column. It maps to the ADF servicePrincipalId property. The Service Principal Key supplies the application key as plaintext in the LS_ServicePrincipalKey column, or as an Azure Key Vault reference held in the LS_ServicePrincipalKeyKVS_ fields that resolves to the key at runtime. It maps to the ADF servicePrincipalCredential property. When a Service Principal Key is supplied, BimlFlex writes the ADF servicePrincipalCredentialType property as ServicePrincipalKey.

note

It is suggested that Azure Key Vault be used in place of manually entering the Service Principal Key.

Office365​

Office365 authentication signs in to the Dynamics CRM instance with a Username and Password.

The Username is stored in the connection's LS_Username column and maps to the ADF username property. The Password field accepts the password as plaintext in the LS_Password column, or an Azure Key Vault reference held in the LS_PasswordKVS_ fields that resolves to the password at runtime. It maps to the ADF password property.

Office365 authentication cannot be used when the user is configured in Microsoft Entra ID for conditional access or multifactor authentication. Use AAD Service Principal in that case.

note

It is suggested that Azure Key Vault be used in place of manually entering the Password.

Azure Data Factory Linked Service Additional Information​

For additional information on ADF Dynamics CRM Linked Service and its connection requirements see the Azure Data Factory Dynamics 365 (Microsoft Dataverse) or Dynamics CRM Connector documentation.