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

# tenant

> Gets the tenant you're signed in to.



**query** `tenant: Tenant!`

## Returns

`Tenant!`

**`appSettings`**: `[AppSetting!]!`

Tenant-level settings in one app's namespace; all of them unless `keys` narrows it down.

**Arguments:**

- `appKey`: `SettingsAppKey!`
- `keys`: `[String!]`

---

**`createdAt`**: `DateTime!`

When the tenant was created (UTC).

---

**`deletedAt`**: `DateTime`

When the tenant was deleted (UTC). Null while it's live.

---

**`displayName`**: `String!`

Name of the tenant shown in Studio, 3 to 50 characters.

---

**`id`**: `ID!`

Global id of the tenant. `node` resolves it only for the tenant you're signed in to. `TenantUser.tenantId` and `DataProvider.tenantId` hold the raw UUID.

---

**`isDeleted`**: `Boolean!`

True if the tenant is deleted.

---

**`roles`**: `RolesConnection`

Roles you can give users in the tenant. `inviteUserToTenant` and `replaceUserRoles` take them by `Role.key`.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[RoleSortInput!]`
- `where`: `RoleFilterInput`

---

**`safeName`**: `String!`

Short name of the tenant, unique across Occtoo: camelCase letters and digits, 3 to 50 characters (e.g. `acme`). Set when the tenant is created; can't change.

---

**`settings`**: `TenantSettings!`

Languages of the tenant and its master language.

---

**`tenantUsers`**: `TenantUsersConnection`

List of users assigned to the tenant

> Deprecated: Use `users` field instead

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[TenantUserSortInput!]`
- `where`: `TenantUserFilterInput`

---

**`tier`**: `Tier`

Plan the tenant is on. Platform administration; not needed for integrations.

---

**`tierId`**: `String`

Raw id of the tenant's tier (`Tier.id` holds the global one). Null if it has none. Platform administration; not needed for integrations.

---

**`usageLimits`**: `TenantUsageLimits!`

Effective usage limits for the tenant (tier defaults overlaid with per-tenant overrides).

---

**`users`**: `UsersConnection`

Users with access to the tenant, invited ones that haven't signed in yet included. Filter `status: ACTIVE` for users who have signed in. Returns all users in one page.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[UserV2SortInput!]`
- `where`: `UserV2FilterInput`

## Examples

```graphql Query
query Tenant {
  tenant {
    createdAt
    deletedAt
    displayName
    id
    isDeleted
    roles {
      edges {
        cursor
        node {
          __typename
        }
      }
      nodes {
        description
        id
        isDefaultRole
        key
        name
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
    }
  }
}
```

```json Response
{
  "data": {
    "tenant": {
      "createdAt": "value",
      "deletedAt": "value",
      "displayName": "string",
      "id": "id",
      "isDeleted": true,
      "roles": {
        "edges": [
          {
            "cursor": "string",
            "node": {
              "__typename": "Role"
            }
          }
        ],
        "nodes": [
          {
            "description": "string",
            "id": "string",
            "isDefaultRole": true,
            "key": "string",
            "name": "string"
          }
        ],
        "pageInfo": {
          "endCursor": "string",
          "hasNextPage": true,
          "hasPreviousPage": true,
          "startCursor": "string"
        }
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.