> ## 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.

# Asana User Provisioning & Deprovisioning

> Automate Asana user provisioning and deprovisioning from your HRIS. Klef creates, updates, and deactivates accounts when HR makes a change.

![](https://mintcdn.com/klef/O1Sswmcb_uCGkmIf/images/connectors/asana.svg?fit=max\&auto=format\&n=O1Sswmcb_uCGkmIf\&q=85\&s=6f4b0cd3f5ce8db5c7381911e28732e3)

# Asana

## Connection

### Setup

Klef reaches Asana as a service account, which Asana offers on Enterprise and Enterprise+ plans.

**Step 1**

As an organization owner, open the **Admin Console**, then **Apps**, then **Service accounts**, and add a service account.

**Step 2**

Copy its token into Klef with your organization ID, which is the number in the address of the Admin Console.

Klef can see whether a member is an admin or a guest, but can't change it. Guests can't hold licenses.

### Settings

| Setting | Required | Description |
| - | - | - |
| Workspace ID | Yes | ID of your Asana organization, from the address of its Admin Console or of any of its projects. |
| Service account token | Yes | The token of a service account, which an organization owner makes in the Admin Console. |

## asana.user

### Fields

| Field | Type | Required | Description |
| - | - | - | - |
| `email` | string | Yes | Email address Asana invites. The connector does not change it once the user exists. Never changed once the account exists. |
| `teams` | entitlements | | Teams the user belongs to. One row grants one team. |
| `teams[]` | string | | Team gid. |
| `licenses` | entitlements | | Asana licenses assigned to the user. Guests hold none. One row grants one license. |
| `licenses[]` | string | | Asana license, such as work management. |
| `status` | enum | | Whether the person can sign in, the account is kept switched off, or the account is gone. Values: `enabled` (Enabled), `removed` (Removed). |

### Default Account Matching Rules

When Klef [adopts](https://klef.ai/docs/adoption.md) an account that already exists in Asana, 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

### Asana members

Adds each engineer to Asana, and removes them when they leave.

```hcl theme={null}
stage active {
  target asana.user {
    email  = worker.business_email
    status = enabled
  }
}
```


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