Skip to main content

Configuring an ADF Linked Service Connection for Dynamics 365

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 365 from the Linked Service Type dropdown, the form required for creating a Dynamics 365 Linked Service will appear.

Source Only Connector​

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

Dynamics 365 and Dynamics CRM 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
Service principal keyService Principal Id and Service Principal KeyNone
Service principal certificateService Principal Id and an Azure Key Vault reference to the certificateNone

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

Complete Example: Service Principal Key with Azure Key Vault​

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

Required Fields​

Common Required Fields

A Dynamics 365 Linked Service connection uses a single Authentication Type, service principal, so the same fields are required whichever Authentication Method is chosen.

These common required fields are:

Connect via Integration Runtime​

Connect via Integration Runtime names the integration runtime for a Dynamics 365 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 service principal authentication applies to.

Service Uri​

The Service Uri is the address of the Dynamics 365 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 selects how the service principal proves its identity. Supported values are Service principal key and Service principal certificate.

BimlFlex writes the Authentication Type AADServicePrincipal to the linked service for both values. The method selects the ADF servicePrincipalCredentialType property: ServicePrincipalKey for the key and ServicePrincipalCert for the certificate.

Service principal key​

The Service Principal Id supplies the client ID of the Microsoft Entra 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.

note

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

Service principal certificate​

The Service Principal Id is entered as for the key method. The Service Principal Key field holds an Azure Key Vault reference in the LS_ServicePrincipalKeyKVS_ fields that points to the certificate, and it maps to the ADF servicePrincipalCredential property. Azure Data Factory accepts the certificate only as an Azure Key Vault reference, with the certificate content type PKCS #12.

Microsoft recommends the key method over the certificate method for this connector.

Azure Data Factory Linked Service Additional Information​

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