Xero connection error using oAuth2

Oleksandr Muzychenko 0 Reputation points
2024-07-23T14:53:58.79+00:00

I'm trying to establish the connection to Xero using the Xero connector via oAuth2 with the clientId and clientSecret.

In the UI form, the required fields are:

  • ClientID
  • ClientSecret
  • TenantID
  • RefreshToken

After filling all fields with the correct value and testing the connection the next error message appears:

The value of the property '' is invalid: 'Connection string exceeds maximum allowed length of 1024.'. Connection string exceeds maximum allowed length of 1024.

Screenshot 2024-07-23 at 17.52.44

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,814 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Pinaki Ghatak 4,610 Reputation points Microsoft Employee
    2024-07-24T09:08:53.7233333+00:00

    Hello @Oleksandr Muzychenko

    The error message suggests that the connection string exceeds the maximum allowed length of 1024. This error usually occurs when the connection string is too long to be processed by the system.

    To resolve this issue, you can try the following steps:

    1. Check if you have entered the correct values for the ClientID, ClientSecret, TenantID, and RefreshToken fields. Make sure that there are no extra spaces or characters in the values.
    2. Try to shorten the connection string by removing any unnecessary parameters or values. For example, you can try removing the "useEncryptedEndpoints", "useHostVerification", and "usePeerVerification" parameters if they are not required for your connection.
    3. If the above steps do not work, you can try creating a new Xero connector and enter the required values again. Sometimes, this can help resolve the issue.

    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    0 comments No comments

  4. Chandra Boorla 2,525 Reputation points Microsoft Vendor
    2024-07-24T10:41:24.66+00:00

    Hi @Oleksandr Muzychenko

    Thanks for the question and using MS Q&A platform.

    In addition to Pinaki Ghatak,

    The error message "Connection string exceeds maximum allowed length of 1024" occurs because the maximum length of the connection string that can be passed to an ODBC driver is limited to 1024 characters. To resolve this issue, you can try the following workaround:

    1. Store the connection string in an Azure Key Vault: Store the connection string in Azure Key Vault and retrieve it in your Azure Data Factory pipeline using Key Vault references. This way, you can pass a reference to the Key Vault secret in your pipeline instead of the actual connection string, which could be longer.
    2. Use a Data Source Profile: Instead of passing the connection string directly, you can create a Data Source Profile in Azure Data Factory that contains the connection string information. Then, you can reference the Data Source Profile in your pipeline, which would allow you to use a much longer connection string without hitting the 1024-character limit.
    3. Shorten the connection string: If neither of the above options is feasible, you may try to shorten the connection string by removing any unnecessary parameters or by using a DSN (Data Source Name) instead of a DSN-less connection string.

    Please refer to the below links for more details.

    https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault

    https://learn.microsoft.com/en-us/office/troubleshoot/access/create-dsn-less-connection-linkted-table

    Hope this helps! Let me know if you have any further questions.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.