> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/d/drata.md).

# Drata

Drata is a compliance automation platform that tracks employee devices. OctoXLabs uses it to add the devices that Drata monitors, with MAC address, model, serial number and optionally installed software, to the inventory.

## Use cases

* Find devices tracked by Drata that your EDR does not cover.

```
Adapters = drata AND NOT Adapters = falcon-crowdstrike
```

* List Drata devices by operating system type.

```
Adapters = drata AND OS.Type = Windows
```

## Before you begin

### Network

| Source              | Destination                           | Port | Protocol |
| ------------------- | ------------------------------------- | ---- | -------- |
| OctoXLabs connector | `public-api.drata.com` (configurable) | 443  | HTTPS    |

### Required permissions

| Scope or role                                                 | Permission | Needed for                 |
| ------------------------------------------------------------- | ---------- | -------------------------- |
| API key scope **All read**, or custom read scopes for devices | Read       | Devices and installed apps |

Not verified: the exact custom scope names. **All read** is the documented safe choice.

## Create credentials in Drata

{% stepper %}
{% step %}

### Open Settings

In Drata, open **Settings** from the bottom left navigation.
{% endstep %}

{% step %}

### Create the key

Select **API Keys** and click **Create API Key**.
{% endstep %}

{% step %}

### Enter details

Enter a Name (it cannot be changed). Set an Expiration Date (12 months, Never or Custom). Optionally set Allowed IP Addresses to restrict usage. Choose Scopes: Custom, All read, or All read and write.
{% endstep %}

{% step %}

### Save the key

Save the key and store it. After you select **Done**, the full key is not shown again.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required | Type    | Default                | Description                                                                 |
| ------------------------ | -------- | ------- | ---------------------- | --------------------------------------------------------------------------- |
| Domain                   | Yes      | String  | `public-api.drata.com` | API domain. Change it only for a custom endpoint.                           |
| API Token                | Yes      | String  | None                   | Drata API key, sent as a bearer token.                                      |
| Fetch Installed Software | No       | Boolean | `False`                | Also fetch installed applications of every device (one request per device). |

## Troubleshooting

| Error message                                                 | Cause                                         | Fix                                                     |
| ------------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------- |
| `Request failed after <n> retries for url <url>`              | Drata kept answering HTTP 429.                | Retry later.                                            |
| `Failed to fetch data: <status>`                              | Drata answered a non-200 status while paging. | Check the key, its scopes and its allowed IP addresses. |
| `Invalid JSON response while fetching data (status=<status>)` | The answer was not JSON.                      | Check the domain.                                       |

## Change history

{% hint style="info" %}
Available starting from version 6.0.0.
{% endhint %}
