> 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/action-center/tenable/unlink-tenable-agents.md).

# Unlink Tenable Agents

Unlinks the Tenable agents of the matched devices from your Tenable container in bulk requests of up to 5,000 agents. The console warns that this cannot be undone from Tenable. Unlink Tenable Agent Per Asset does the same with one request per agent and a **Maximum Assets** cap.

### Before you begin

* An API key pair for Tenable Vulnerability Management: an **Access Key** and a **Secret Key**, generated in the Tenable console under Settings - My Account - API Keys. The default **Domain** is `https://cloud.tenable.com`.
* Connection defaults (Domain, Access Key, Secret Key, Timeout, Verify SSL) can be saved once under **Action Center** > **Settings**. See [Action Center Settings](broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2).
* Asset type: device only.
* The device must carry a Tenable agent id (column `Specifics.tenable-io.id`, collected by the Tenable adapter). Devices without it are dropped before the job runs.
* The user that owns the API keys needs at least the Scan Manager role \[40] for agent actions. Tenable answers 403 otherwise.

### Settings

The job node shows these fields.

| Setting             | Type           | Required | Default                     | Description                                                                                               |
| ------------------- | -------------- | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------- |
| Domain              | URL            | No       | <https://cloud.tenable.com> | Base URL of Tenable. Example: `https://cloud.tenable.com`.                                                |
| Access Key          | Sensitive text | Yes      | None                        | Generated in the Tenable console under Settings - My Account - API Keys. Masked after saving.             |
| Secret Key          | Sensitive text | Yes      | None                        | The secret key of the same key pair. Masked after saving.                                                 |
| Timeout             | Number         | No       | 30                          | Request timeout in seconds.                                                                               |
| Verify SSL          | Boolean        | No       | On                          | Verify the TLS certificate of the Tenable host.                                                           |
| Retry on Rate Limit | Boolean        | No       | On                          | Retry a request once when Tenable answers 429, waiting for the `retry-after` header (at most 60 seconds). |

{% hint style="danger" %}
Unlinking an agent cannot be undone through the API. The run log lists the agent ids that were unlinked, so check the condition before you enable the workflow.
{% endhint %}

### How it works

* Agent ids come from the matched devices. Repeated ids are removed.
* The job writes the list of agent ids to the run log, then sends `POST /scanners/null/agents/_bulk/unlink` with an explicit list for each chunk of up to 5,000 ids and logs the Tenable task id.
* No matched device has an agent id: the job logs a warning and sends nothing.
* A failed request fails the job. Chunks already queued before the failure stay queued in Tenable.
* This job has no **Maximum Assets** setting.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Unlink the agents of devices that your condition marks as retired.

| Setting    | Value                       |
| ---------- | --------------------------- |
| Domain     | `https://cloud.tenable.com` |
| Access Key | `YOUR_ACCESS_KEY`           |
| Secret Key | `YOUR_SECRET_KEY`           |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/ed78ac5bacec4909acb71c776dd17d62cfa78748">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save connection defaults for Tenable jobs.</td><td><a href="broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2">Broken link</a></td></tr><tr><td><strong>Unlink Tenable Agent Per Asset</strong></td><td>Unlink each matched device's Tenable agent with one call per agent.</td><td><a href="broken://pages/d90dba2fa85c8d9badd0697c7563cc77591dc069">Broken link</a></td></tr></tbody></table>

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