# Resetting your Xero Connection

Source: https://docs.astalty.com.au/guide/integrations/xero-integration/resetting-your-xero-connection

> Restore Xero access, resolve a failed connection attempt, and retry invoices, payments, timesheets or leave.

Use **Refresh Connection** when Astalty asks you to reconnect or grant missing payroll or leave access. A successful refresh restores access and automatically retries failed invoice batches. Check the affected work afterwards to see whether anything still needs attention.

## Disconnect your Account

Do not disconnect as the first troubleshooting step. Disconnecting removes Astalty's stored credentials and clears Xero as the selected invoicing platform. Astalty cannot read from or send to Xero again until you reconnect. Use it when you intend to remove or replace the Xero connection. See [Connecting and Disconnecting](https://docs.astalty.com.au/guide/integrations/xero-integration/connecting-and-disconnecting).

## Reconnect your Account

1. Open [Settings > Integrations > Xero](https://app.astalty.com.au/settings/integrations/xero).
2. Select **Actions > Refresh Connection**, or the refresh button beside the connection warning.
3. Sign in to Xero, select the correct organisation, and grant every requested permission.
4. Wait for **Connection successful.** before closing the dialog.
5. Confirm that **Connected Organisation** is correct and that the warning which prompted the refresh has cleared.

If the credentials exist but no valid organisation is selected, use **Select Organisation** on the Xero settings card.

![The connected Xero integration card with the Refresh Connection button highlighted beside View Details.](https://docs.astalty.com.au/assets/xero-current-refresh-required.png)

### If The Refresh Fails

The dialog shows **Something went wrong connecting to Xero.**, followed by the reason. If Xero refused access, it also lists what is missing. Ask a Xero administrator with the required accounting and payroll access to refresh the connection.

![The failed Xero connection dialog explains that the connected account lacks sufficient access and lists the missing payroll.employees permission. The error message is highlighted above Close.](https://docs.astalty.com.au/assets/xero-current-refresh-failed.png)

If the sign-in attempt has expired or was already used, close the dialog and start **Refresh Connection** again from Astalty. Reopening an old return link does not grant new access. **Your Xero account is already connected.** on a reused link is not confirmation that missing access has been added.

If the connection succeeds but a **Default Sales Account** or other setup warning remains, complete [Configuring the Integration](https://docs.astalty.com.au/guide/integrations/xero-integration/configuring-the-integration). Refreshing cannot fill in missing settings or mappings.

### Timesheets Work But Leave Does Not

Older connections can have enough access to send timesheets without the access needed to send leave. When **Sync leave automatically** is enabled and that access is missing, Astalty shows a leave warning on the Xero connection. Refresh, confirm the warning clears, then check the affected leave requests using [Xero Leave Sync](https://docs.astalty.com.au/guide/scheduling/leave#xero-leave-sync).

## Syncing Failed Batches

After a successful connect or refresh, Astalty automatically queues failed invoice batches for another attempt. Open the batch and check the result before starting another sync.

To start a sync yourself, select **Actions > Sync with accounting** on the finalised batch. The action is available while the batch is new, pending or failed and the selected accounting platform is ready. It can also reappear on a synced batch after Astalty confirms that Xero no longer has one of its invoices. A batch marked **Synced** can still contain an individual invoice error; follow [Sync With Xero](https://docs.astalty.com.au/guide/integrations/xero-integration/sync-payments-with-xero) for that case.

## Syncing Reconciliation Payments

For a batch that is already synced and still outstanding, select **Actions > Sync payments**. Astalty queues a fresh payment pull for each non-NDIA invoice in the batch. See [Sync Payments Within Batch](https://docs.astalty.com.au/guide/integrations/xero-integration/sync-payments-with-xero#sync-payments-within-batch).

## Retrying Timesheets And Leave

For timesheets, open the batch and inspect the latest export results before sending again. A partially failed export may already have sent some workers. Validate again after restoring access, then follow [Re-Exporting a Batch](https://docs.astalty.com.au/guide/process-timesheet-batches-for-xero-payroll-integration) to review which drafts will be replaced or cleared.

For leave, open the approved request and check its payroll sync result. Use **Sync to Xero** for a failed sync after resolving the cause. A request marked **Already in Xero** has no further sync action; check the existing leave and the recorded reason. See [Xero Leave Sync](https://docs.astalty.com.au/guide/scheduling/leave#xero-leave-sync).
