> 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/t/threatlocker.md).

# ThreatLocker

ThreatLocker is a Zero Trust endpoint protection platform with application allowlisting, ringfencing and storage control. OctoXLabs reads the computers of one organization, including child organizations, and adds them to the device inventory.

## Use cases

* **Find devices without ThreatLocker coverage.** How devices are matched depends on your device merge settings.

```
Adapters = active-directory AND NOT Adapters = threatlocker
```

* **Find ThreatLocker computers that other sources do not report.**

```
Adapters = threatlocker AND NOT Adapters = active-directory
```

## Before you begin

### Network

| Source              | Destination                                                | Port | Protocol |
| ------------------- | ---------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | portalapi.`<instance>`.threatlocker.com (Domain parameter) | 443  | HTTPS    |

The connector always uses HTTPS. If a proxy is set, requests go through it.

### Required permissions

| Scope or role | Permission                                       | Needed for        |
| ------------- | ------------------------------------------------ | ----------------- |
| API User role | View Computers, for the organization to discover | Listing computers |

## Create credentials in ThreatLocker

{% stepper %}
{% step %}

### Open API Users

In the ThreatLocker Portal, go to **Manage > Users > API Users**.
{% endstep %}

{% step %}

### Create the API User

Create a new API User and assign a role that has the **View Computers** permission for the organization you want to discover.
{% endstep %}

{% step %}

### Copy the token

Choose an expiration period and copy the generated token. It is shown only once. The token renews on every use, so it expires only after a period of inactivity.
{% endstep %}

{% step %}

### Find the domain and organization ID

Take the instance code from your portal URL and prefix it with `portalapi.`. A portal at `portal.ae1.threatlocker.com` uses `portalapi.ae1.threatlocker.com`. The organization GUID is in the portal URL after you switch into the organization.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required | Type    | Default | Description                                                                                                                                                     |
| ------------------------ | -------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Domain                   | Yes      | String  | None    | Portal API host, without a scheme.                                                                                                                              |
| API Key                  | Yes      | String  | None    | API User token, sent as-is without a Bearer prefix.                                                                                                             |
| Organization ID          | Yes      | String  | None    | GUID of the organization to collect. Sent as the `ManagedOrganizationId` header. Child organizations are included. For MSP tenants use the parent organization. |
| Override Organization ID | No       | String  | None    | Sent as the `OverrideManagedOrganizationId` header only when filled. Leave empty unless ThreatLocker support asks for it.                                       |
| Proxy                    | No       | String  | None    | Proxy address, used as `http://<value>` for HTTP and HTTPS.                                                                                                     |
| Timeout                  | No       | Integer | 30      | Seconds to wait for an API response.                                                                                                                            |

## Troubleshooting

| Error message                                                  | Cause                                                                                   | Fix                                                                                          |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Status Code: `, followed by URL, Method and the response body` | The API answered with a status other than 200. This is the shared REST connector error. | Check the token, the organization ID, the portal API host and the View Computers permission. |

## Change history

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