Establishing a Connection
Configure a Connection Profile
From the CData ribbon, click Get Data and select From Xero connection/s to launch the CData Query window. To setup a new connection, you will have to click the New Xero Connection button. Here you can set the connection settings, test the connection, and save the connection profile.
Connecting to a Xero API
The add-in supports the following Xero APIs:
- Accounting API: Set the Schema connection property to ACCOUNTING
- Australian Payroll API: Set the Schema connection property to PAYROLLAUS
- Files API: Set the Schema connection property to FILES
- Fixed Assets API: Set the Schema connection property to ASSETS
- Projects API: Set the Schema connection property to PROJECTS
It is also recommended that you set the Tenant property, which can be the name or ID of a Xero organization. Xero allows you to authorize the add-in to access multiple organizations. By default the add-in will pick the first one, which may not be the one you expect if the add-in is granted access to additional organizations.
If you need to confirm what organizations the add-in has access to, you can connect without an Tenant and read the Tenants view. This will provide both the ID and the name of each connected organization. You should use the ID to set the Tenant property when possible since multiple organizations can have the same name.
Authenticating to Xero
All connections to Xero are authenticated using OAuth. The add-in supports using PKCE applications and OAuth applications. For desktop applications, the add-in's embedded application is the simplest way to authenticate.
When the add-in starts, it will open a browser and Xero will request your login information. The add-in will use the credentials you provide to access your Xero data. These credentials will be saved and automatically refreshed as needed. For desktop applications, the add-in's default application is the simplest way to authenticate.
When the add-in starts, it will open a browser and Xero will request your login information. The add-in will use the credentials you provide to access your Xero data. These credentials will be saved and automatically refreshed as needed.
Connection Properties
The Connection properties describe the various options that can be used to establish a connection.
Managing Connections
After successfully authenticating to Xero you will be able to customize the data you are importing. To learn more about this, see Managing Connections.
See Also
- Querying Data: Use the data selection wizard to pull data into a spreadsheet. You can also configure scheduled data refresh here.
- Using the Excel Add-In: Find other ways to interact with Xero data, such as using the available CData Excel Functions.