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

# Box

<div className="page-title-row">
  <img src="https://mintcdn.com/klef/xJ0kXbcegZOD2G3h/images/connectors/box.svg?fit=max&auto=format&n=xJ0kXbcegZOD2G3h&q=85&s=01586062dfec7aacfd8fdccd937faa6d" alt="" noZoom width="24" height="24" data-path="images/connectors/box.svg" />

  <h1>Box</h1>
</div>

## Connection

Connecting sends you to Box to approve Klef's access.

### Permissions

Minimum permissions the connection requires.

| Capability      | Required | Granted by (any one)                   |
| --------------- | -------- | -------------------------------------- |
| Provision users | Yes      | `manage_managed_users`, `Manage users` |
| Manage groups   | Yes      | `manage_groups`, `Manage groups`       |

## box.user

### Fields

| Field      | Type              | Required | Description                                                                                        |
| ---------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------- |
| `email`    | string            | Yes      | Email address the user signs in with. Klef does not change it once the user exists.                |
| `name`     | string, up to 50  | Yes      | Full name.                                                                                         |
| `role`     | enum              |          | Role in the enterprise. Defaults to user. Values: `user` (User), `coadmin` (Co-admin).             |
| `jobTitle` | string, up to 100 |          | Job title.                                                                                         |
| `phone`    | string, up to 100 |          | Phone number.                                                                                      |
| `address`  | string, up to 255 |          | Address.                                                                                           |
| `groups`   | grant             |          | Groups the user belongs to. One row grants one group.                                              |
| `groups[]` | string            |          | Group ID.                                                                                          |
| `active`   | bool              |          | Whether the user can sign in. An inactive user keeps their content, which is how Klef removes one. |

### Default Account Matching Rules

When Klef [adopts](/docs/adoption) an account that already exists in Box, it works out whose it is by trying these in order. A connection can override them.

| Account field | Worker field            |
| ------------- | ----------------------- |
| `email`       | `worker.business_email` |

## Examples

### Box users

A Box user for every employee, deactivated with their files kept when they go.

```hcl theme={null}
stage active {
  target box.user {
    email    = worker.business_email
    name     = worker.display_name
    jobTitle = worker.job.name
    role     = "user"
    active   = true
  }
}
```
