> 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/add-agent-to-agent-group-on-tenable.md).

# Add Agent to Agent Group on Tenable

Adds the Tenable agents of the matched devices to a Tenable agent group. The job collects the agent ids from the devices and sends them in bulk requests of up to 5,000 agents. Tenable processes each request as a queued task. Add Agent to Agent Group Per Asset on Tenable 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). |
| Agent Group         | Text           | Yes      | None                        | The id or UUID of the Tenable agent group.                                                                |

### How it works

* Agent ids come from the matched devices, not from a lookup in Tenable. Repeated ids are removed.
* For each chunk of up to 5,000 ids, the job sends `POST /scanners/null/agent-groups/<group>/agents/_bulk/add` with an explicit list of agent ids and logs the Tenable task id. It never addresses agents by criteria.
* 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

Add the agents of every device found by your condition to one agent group.

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

### 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>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><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></tbody></table>

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