Skip to main content

Configuring an ADF Linked Service Connection for Xero

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 BimlFlex Connection Editor, with the connection column that carries each value and the Azure Data Factory property it maps to named alongside.

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

Source Only Connector​

A Xero connection is used as a source. It is not available as a target. The Xero Linked Service Type is offered on connections that use the Xero System Type.

Each Xero object is read whole. The dataset names the object's table only, and the copy source carries no query.

A filled Override SQL on a Xero object is not written to the copy source, and neither is the text of the object's Override SQL extension point when the Override SQL is empty. The build reports a warning that names the object, and the copy reads the whole object.

Choosing an Authentication Method​

MethodCredentials
OAuth 2.0Client Id, Tenant Id, Client Secret and Refresh Token

Recommendation: Store the Client Secret and the Refresh Token in Azure Key Vault rather than entering them as plaintext.

Complete Example: OAuth 2.0 with Azure Key Vault​

The values below are made up for illustration.

FieldExample Value
Connect via Integration RuntimeAutoResolveIntegrationRuntime
Hostapi.xero.com
Client Id<client-id-of-xero-app>
Tenant Id<xero-tenant-id>
Azure Key Vault Linked Servicebfx-kv
Secret Name (for Client Secret)BFX-SRC-XeroClientSecret
Secret Name (for Refresh Token)BFX-SRC-XeroRefreshToken

From these values the build writes a linked service with version set to 2.0, the host, tenantId and clientId, and a clientSecret and a refreshToken that reference the secrets in Azure Key Vault.

Required Fields​

Common Required Fields

A Xero Linked Service connection uses a single Authentication Type, so the same fields are required on every connection.

These common required fields are:

Of these, the form marks the Host, the Client Id and the Tenant Id as required. The Client Secret and the Refresh Token are not marked as required by the form.

Connect via Integration Runtime​

Connect via Integration Runtime names the integration runtime for a Xero 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.

Host​

The Host is the host name of the Xero service. It is stored in the connection's LS_Host column and maps to the ADF host property. When the Host is left blank, the build writes api.xero.com, which the form shows as the placeholder.

Authentication Type​

The Xero Linked Service connection signs in with the client credentials of a Xero application, the Xero tenant and the refresh token. The form has no Authentication Type field for this connector. The linked service is written with version set to 2.0 and the OAuth 2.0 authentication type.

OAuth 2.0​

The Client Id is the client ID of the Xero application and is stored in the connection's LS_ServicePrincipalId column. It maps to the ADF clientId property.

The Tenant Id is the Xero tenant that the connection reads and is stored in the connection's LS_Tenant column. It maps to the ADF tenantId property.

The Client Secret supplies the client secret of the application as plaintext in the LS_ServicePrincipalKey column, or as an Azure Key Vault reference stored in the LS_ServicePrincipalKeyKVS_ fields that resolves to the secret at runtime. It maps to the ADF clientSecret property.

The Refresh Token is entered as plaintext in the LS_RefreshToken column, or as an Azure Key Vault reference stored in the LS_RefreshTokenKVS_ fields that resolves to the token at runtime. It maps to the ADF refreshToken property.

For each of the two secrets, when an Azure Key Vault reference is set, the plaintext value is not written to the linked service.

note

It is suggested that Azure Key Vault be used in place of manually entering the Client Secret and the Refresh Token.

Encrypted Credential​

When the connection's LS_EncryptedCredential column is filled, its value is written to the ADF encryptedCredential property. The Xero form has no field for it, and a value stored in the column is kept when the connection is saved.

Azure Data Factory Linked Service Additional Information​

For additional information on ADF Xero Linked Service and its connection requirements see the Azure Data Factory Xero Connector documentation.