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

# Organizations

> Organizations are an important concept in the Trust Stack. They are used to manage your user groups, permissions, and other resources.

# Tenant vs Organization

## Tenant

A **tenant** is you. It represents your access to the Trust Stack as a integrator. Access tokens are scoped to a tenant. Hypothetically, let's imaging you
were building a Farm Management application called *FarmTrace*. *FarmTrace* would require it's own tenant on the Trust Stack.

This is managed via the [Console](https://console.truststack.dev) and its created when you sign up for the Trust Stack.

## Organization

An **organization** is a group of users that is managed by you (and your tenant). For different use cases and applications, this could mean different things.

Farm Management solution provider *FarmTrace* would have it's own tenant on the Trust Stack. This provides them with access tokens to interact with the Trust Stack.

*FarmTrace*, the hypothetical application, would be able to able to manage `organizations`. A `organization` is a distinct user group of *FarmTrace* such as
an individual farm or farm group.

Let's assume *FarmTrace* has a tenant, and they have their own set of users at *ACME Farms*.

*FarmTrace* is the tenant, *ACME Farms* is the organization.

# Use cases

When using the [API](/api) or [SDK](/client-sdk), scoping to an organization is important. It simplifies the management of resources and permissions.

Let's say you want to display all DIDs owned by a specific farm, like *ACME Farms*, you can provide the `organization` id to the API.

```typescript theme={null}
import { TrustStack } from '@truststack/sdk';

const client = new TrustStack();

const dids = await client.did.getDids(
    { page: 1, pageSize: 100 }, 
    { organizationId: 'ACME-FARMS-ID' }
);
```

This will return all DIDs owned by *ACME Farms*.

Review the [Organizations](/documentation/organizations) section for more information on how to manage organizations.
