> 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/b/beyondtrust-privilege-management.md).

# BeyondTrust Privilege Management

BeyondTrust Endpoint Privilege Management (EPM) Cloud controls local admin rights on endpoints. OctoXLabs reads the managed computers as devices and the console users as users through the Management API.

## Use cases

* List managed computers that report an agent version (Devices).

```
Adapters = beyondtrust-epm AND AgentVersions = *
```

* List EPM Cloud console users (Users).

```
Adapters = beyondtrust-epm
```

## Before you begin

### Network

| Source              | Destination                       | Port | Protocol |
| ------------------- | --------------------------------- | ---- | -------- |
| OctoXLabs connector | -services.pm.beyondtrustcloud.com | 443  | HTTPS    |

### Required permissions

| Scope or role                          | Permission | Needed for                           |
| -------------------------------------- | ---------- | ------------------------------------ |
| API account scope `urn:management:api` | Read       | Management API (Computers and Users) |

## Create credentials in BeyondTrust Privilege Management

{% stepper %}
{% step %}

### Open API Settings

In the EPM Cloud console, go to **Configuration > Settings > API Settings**.
{% endstep %}

{% step %}

### Create the API account

Create an API account with the `urn:management:api` scope.
{% endstep %}

{% step %}

### Copy the credentials

Copy the **Client ID** and the **Client Secret**. The secret is generated when the account is created.
{% endstep %}

{% step %}

### Find the domain

The domain looks like `<instance>-services.pm.beyondtrustcloud.com`. The instance is your tenant identifier, visible in the console URL.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                            |
| ------------- | -------- | ------- | ------- | ---------------------------------------------------------------------- |
| Domain        | Yes      | String  |         | Services endpoint host, `<instance>-services.pm.beyondtrustcloud.com`. |
| Client ID     | Yes      | String  |         | OAuth2 client ID.                                                      |
| Client Secret | Yes      | String  |         | OAuth2 client secret.                                                  |
| Proxy         | No       | String  |         | Proxy as `host:port`.                                                  |
| Timeout       | No       | Integer | 30      | Seconds to wait for API responses.                                     |

## Troubleshooting

| Error message                | Cause                                                                                                                                  | Fix                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Max retries exceeded for     | The API kept answering 401 or 429.                                                                                                     | Check the credentials. The token lives one hour. The rate limit is 1000 requests per 100 seconds.    |
| Status Code: `, URL, Method` | The API answered with an unexpected HTTP status. The shared request code raises it and logs the status, URL, method and response body. | Check the URL, the credentials and the permissions listed above, then run the connection test again. |

## Change history

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