> 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/documentation/use-octoxlabs/inventories/licences.md).

# Licences

Track the licenses of your products, how many are used and when they expire, from adapters and from licenses you define yourself.

The License Inventory lists the software and service licenses that you want to track, with the total, the number used, the status and the purchase and expiry dates of each one. Use it to see which licenses are about to expire, which are used up, and which tools you pay for. The console page is called **License Inventory** and its menu entry is **Licenses**. This page is titled Licence Inventory in the documentation.

{% hint style="info" %}
The License Inventory tracks the licenses of the products in your environment. It is not the licence of OctoXLabs itself. For that, see Product Licence.
{% endhint %}

### Where the data comes from

Two kinds of records share the inventory:

* **Adapter licenses.** Adapters that report licenses add one record per license. For example, licenses can be fetched directly from Microsoft 365 (OctoXLabs 6.3.0 and later).
* **Custom licenses.** Licenses that you define yourself, one at a time or by file import. They are written to the inventory at each discovery and show the **octoxlabs-license** adapter.

The usage counts of licenses are updated only when your product licence includes the licenses module. Adapter licenses are one record each and are not merged across adapters, see Discovery and Aggregation.

### Open the inventory

In the left menu, choose **Inventories** > **Licenses**. The list opens on the latest completed discovery, and **Discovery Date** lets you look at an earlier run. The toolbar, the chart strip and the query box work as described in Inventories. Under **Licenses** in the menu you also find **Custom License**, **Saved Queries** and **Tags**.

### Columns

The default columns are below. `PrimaryKey` is fixed and opens the detail page. Use **Columns** > **Edit Columns** to add more and **Reset Columns** to return to this set.

| Column                       | What it shows                                                                    |
| ---------------------------- | -------------------------------------------------------------------------------- |
| `Adapters`                   | The adapter that reported the license. Custom licenses show `octoxlabs-license`. |
| `PrimaryKey`                 | The license key. It opens the detail page.                                       |
| `Name`                       | The license name.                                                                |
| `Total`                      | The number of licenses.                                                          |
| `Used`                       | The number of licenses in use.                                                   |
| `Status`                     | The license status.                                                              |
| `PurchaseDate`, `ExpiryDate` | When the license was bought and when it expires.                                 |
| `Description`                | A free text description.                                                         |

### Filter and search

Type a query or build one with **Query Wizard**. Clicking an adapter logo or a tag in the list adds it to the query. The license fields are in the OctoXLabs Query Reference.

**Actions** > **Add Tag** tags the licenses you selected, and **Download** creates a CSV, PDF or XLSX report that appears under **Reports**, see Generate a Report. To chart how many licenses expire soon, use the **License Expiry Status** widget, described in the Chart and Widget Reference.

### Manage custom licenses

Open **Inventories** > **Licenses** > **Custom License** to see the licenses you defined. The list shows the **Application**, **License Name**, **Description**, **Number of Licenses**, **Number of Used Licenses**, **Number of Licenses Remaining**, **Purchase Date** and **Expiry Date**. Each row has edit and delete actions.

#### Create a license

Choose **Create License**. Fill in the form and save.

| Field                             | Description                                                                                             |
| --------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Auto Update**                   | Off by default. Turn it on to link the license to an adapter, see below.                                |
| **License Name**                  | The name of the license. Shown when **Auto Update** is off. A manual license name must be unique.       |
| **Application** and the inventory | Shown when **Auto Update** is on. Choose the adapter and the inventory whose records you want to count. |
| **Number of Licenses**            | How many licenses you own. Required.                                                                    |
| **Number of Used Licenses**       | How many are in use. Shown when **Auto Update** is off.                                                 |
| **Purchase Date**                 | Required.                                                                                               |
| **Expiry Date**                   | Required. It cannot be earlier than the purchase date.                                                  |
| **Description**                   | Free text.                                                                                              |

The form has no field for `Status`. You can set it only in a bulk import file. The **Number of Licenses Remaining** is always the number of licenses minus the number used.

#### What Auto Update does

With **Auto Update** on, OctoXLabs counts the use itself. The license takes the name of the adapter you chose. After each discovery, the number of used licenses is set to the number of records of that adapter in the inventory you chose, for example the devices that CrowdStrike reports. Pick the adapter from the list of your adapters that report devices, users, licenses, software, AI services or vulnerabilities. You cannot enter a used count by hand for an auto update license. If the used count goes above the number of licenses, OctoXLabs creates a notification that the license count is exceeded for that adapter.

#### Import licenses from a file

Choose **Bulk Import** to create many licenses at once. The page is called **Bulk License Import**.

{% stepper %}
{% step %}

#### Download the template

Choose **Download Template** and pick **Download CSV Template** or **Download XLSX Template**. The template changes with the **Auto Update** switch, so set the switch first.
{% endstep %}

{% step %}

#### Fill in the file

Without **Auto Update**, the columns are `name`, `count`, `used_license`, `start_time`, `end_time`, `description` and `status`. With **Auto Update**, they are `adapter_name`, `inventory`, `count`, `start_time`, `end_time`, `description` and `status`. Write dates as `YYYY-MM-DD`. Dates can be left empty in a file. Write `adapter_name` as the adapter is named in OctoXLabs (upper or lower case does not matter). The `inventory` value must be one of `devices`, `users`, `certificates`, `services`, `source_codes`, `applications`, `vulnerabilities`, `ais`, `domains`, `licenses`, `policies` or `webapps`.
{% endstep %}

{% step %}

#### Upload the file

Under **Upload File (CSV or XLSX)**, select the file and choose **Upload**. Do not close the page while the import runs. It shows **Total Rows**, **Successful** and **Failed**. A notification tells you when the import is completed, or completed with errors. Check **System Activities** for details of failed rows.
{% endstep %}
{% endstepper %}

Bulk import is available since OctoXLabs 6.5.0.

### Expiry and usage notifications

OctoXLabs checks license expiry dates and sends a notification that licenses will expire in 30 days. It also notifies you when an auto update license is used above its count.

### The license detail page

Click a **PrimaryKey** to open the license. The card at the top shows the **Data Source**, **Primary Key**, **Name**, **Description**, **Purchase Date**, **Expiry Date**, **Total Licenses**, **Used License** and **Status**. Below it, choose **Pretty View**, **Raw** or **Dependency Map**. The tabs show the merged **OctoXLabs** view and the data of the reporting adapter. The **Discovery Date** selector shows the license as it was in an earlier discovery.

### 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>Certificate Inventory</strong></td><td>Track certificate expiry the same way.</td><td></td></tr><tr><td><strong>Chart and Widget Reference</strong></td><td>Add a License Expiry Status widget.</td><td></td></tr><tr><td><strong>Product Licence</strong></td><td>The licence of OctoXLabs itself and its modules.</td><td></td></tr><tr><td><strong>System Activities</strong></td><td>Review failed imports and notifications.</td><td></td></tr></tbody></table>
