Tenant

Multi-tenancy

Xero uses a multi-tenancy system, which means that you can connect to multiple Xero tenants (or organizations) using the same application.

When you connect to Xero, you will be prompted to select a tenant. This tenant will be used for all API calls until you change it.

To set the tenant call setTenantId and pass in your tenantId

Once set, all calls will use the set tenant.

Xero::setTenantId($tenantId)

Get Tenant ID

To get the ID the current tenant is connected to, you can use the following method:

Xero::getTenantId()

Get Tenant Name

To get the tenant name, you can use the following method:

Xero::getTenantName()

Copyright © 2006 - 2025 DC Blog - All rights reserved.