> ## Documentation Index
> Fetch the complete documentation index at: https://control-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Xero

> Authorize Control to read accounting data from a Xero organization.

export const ControlAppLink = ({path, breadcrumb, children}) => {
  const link = <a href={`https://app.control.dev${path}`} target="_blank" rel="noopener noreferrer" aria-label={breadcrumb ? `Open ${breadcrumb} in Control` : undefined}>
      {children}
    </a>;
  return breadcrumb ? <Tooltip tip={breadcrumb}>{link}</Tooltip> : link;
};

Xero connects to Control through OAuth. Use a Xero account that can access the organization you want to connect.

## Connect in Control

1. Open <ControlAppLink path="/entities-data-sources/overview"><strong>Entities & sources</strong></ControlAppLink>.
2. Open the intended entity, choose **Add data source**, and select **Xero**.
3. Give the data source a recognizable name.
4. Choose **Connect Xero**.
5. Sign in to Xero, select the intended organization, and allow access.
6. Return to Control and confirm that the data source shows as connected.

Control stores the OAuth credentials securely and refreshes them automatically.

## Permissions requested

| Xero scope                 | Resources read by Control                    |
| -------------------------- | -------------------------------------------- |
| `accounting.invoices.read` | Sales and purchase invoices and credit notes |
| `accounting.settings.read` | Chart of accounts and tracking categories    |
| `accounting.journals.read` | General-ledger journals                      |
| `offline_access`           | Refresh tokens for scheduled syncs           |

These are read-only scopes. Control does not request contacts or accounting-report scopes; contact details used by the
integration come from invoices and credit notes.

## Data imported

* Chart of accounts
* General-ledger journals
* Tracking categories and options
* Sales and purchase invoices with line items, contacts, payment status, and paid amounts
* Sales and purchase credit notes with line items and contacts

## Common problems

* **The organization is not available:** confirm that the signed-in Xero user has access to it, then try again.
* **The wrong organization was connected:** reconnect the data source and select the organization that belongs to the Control entity.
* **The connection stopped working:** access may have been revoked in Xero. Reconnect the data source in Control.

## Provider documentation

* [Xero: connect your app](https://developer.xero.com/documentation/guides/oauth2/auth-flow/)
* [Xero OAuth scope reference](https://developer.xero.com/documentation/guides/oauth2/scopes/)
* [Xero: manage connected apps](https://central.xero.com/s/article/Manage-connections-to-Xero)
