Skip to main content

Troubleshoot the Xero connector

Beta

This feature is in Beta. To use it, a workspace admin must turn on Lakeflow Connect for Xero from the Previews page. See Manage Databricks previews.

Resolve authentication, access, and rate-limit errors from the managed Xero connector in Lakeflow Connect.

For general troubleshooting guidance that applies to all managed ingestion pipelines, see Troubleshoot managed ingestion pipelines.

Pipeline fails to authenticate​

Cause: Xero returned an HTTP 401 response, and refreshing the access token didn't fix it. This usually means one of the following: the refresh token expired, the app's client secret changed, or a user disconnected the app from the organization. Xero expires refresh tokens that aren't used for 60 days. See OAuth 2.0 FAQ.

Solution:

  1. Verify that the Client ID and Client Secret in the Unity Catalog connection match your Xero app. If you generated a new secret, update the connection. See Create a Xero connection.
  2. Sign in to Xero again from the connection to get a new refresh token.
  3. Schedule the pipeline to run at least every 60 days so that the refresh token stays valid.

Xero denies access to the organization​

Cause: Xero returned an HTTP 403 response. This usually means one of the following: the tenant_id option doesn't match an organization connected to the app, the authorizing user lost access to the organization, or the organization lacks a product that a table needs, such as Xero Projects.

Solution:

  1. Verify that tenant_id is the tenantId of an organization connected to the app. See Find the tenant ID.
  2. Confirm that the authorizing user still has Standard, Adviser, or Administrator access with the Connected Apps permission. See Permissions.
  3. If the error affects only projects, confirm that the organization subscribes to Xero Projects and that the authorizing user has a Projects user role, or remove that table from the pipeline.

Xero API rate limit exceeded​

Cause: Xero returned an HTTP 429 response because the app exceeded an API limit. Xero limits each organization to 60 calls per minute and 5 concurrent calls. The daily limit for each organization depends on your app's developer pricing tier. See API limits.

Solution:

The connector waits for the time in the Retry-After header and retries automatically. If this happens repeatedly, reduce the pipeline's schedule frequency, ingest fewer full-refresh tables, or reduce the number of pipelines and other apps that call the same organization.