> 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/remove-agent-from-agent-group-per-asset-on-tenable.md).

# Remove Agent from Agent Group Per Asset on Tenable

Removes the Tenable agent of each matched device from a Tenable agent group, with one request per agent. A failure for one agent does not stop the others. Remove Agent from Agent Group on Tenable sends all agents in one bulk request instead.

### 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). |
| Agent Group         | Text           | Yes      | None                        | The id or UUID of the Tenable agent group.                                                                |
| Maximum Assets      | Number         | No       | 500                         | Upper bound on how many assets a single run may act on. Extra assets are logged and skipped.              |

### How it works

* Agent ids come from the matched devices. Repeated ids are removed, then the list is cut to **Maximum Assets**. The skipped agents are logged.
* For each agent the job sends `DELETE /scanners/null/agent-groups/<group>/agents/<agent id>`.
* A failure for one agent is logged and the job continues with the next agent.
* If every agent fails, the job fails. If only some fail, the job succeeds and logs how many succeeded out of the total.
* No matched device has an agent id: the job logs a warning and sends nothing.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Remove up to 100 agents from a group and keep going when one agent is rejected.

| Setting        | Value                       |
| -------------- | --------------------------- |
| Domain         | `https://cloud.tenable.com` |
| Access Key     | `YOUR_ACCESS_KEY`           |
| Secret Key     | `YOUR_SECRET_KEY`           |
| Agent Group    | `12345`                     |
| Maximum Assets | `100`                       |

### 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>Remove Agent from Agent Group on Tenable</strong></td><td>Remove the Tenable agents of the matched devices from an agent group in a single call.</td><td><a href="broken://pages/d5056ea21d2636212824de1082d40b97a3eaef19">Broken link</a></td></tr><tr><td><strong>Add Agent to Agent Group Per Asset on Tenable</strong></td><td>Add each matched device's Tenable agent to an agent group with one call per agent.</td><td><a href="broken://pages/8f7b809ad4d38ef90f2b63691e4fade01e8363ca">Broken link</a></td></tr></tbody></table>

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