> 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/f/fortinac.md).

# Fortinac

FortiNAC is a network access control solution that gives visibility into connecting devices and enforces policies. OctoXLabs reads the hosts known to FortiNAC and, optionally, the managed network devices.

## Use cases

* List all hosts and network devices seen by FortiNAC.

```
Adapters = fortinac
```

* Find hosts FortiNAC sees that are missing from Active Directory.

```
Adapters = fortinac AND NOT Adapters = active-directory
```

## Before you begin

### Network

| Source              | Destination     | Port                         | Protocol                           |
| ------------------- | --------------- | ---------------------------- | ---------------------------------- |
| OctoXLabs connector | FortiNAC server | 8443 (default, configurable) | HTTPS (HTTP when Is secure is off) |

### Required permissions

| Scope or role                   | Permission                                       | Needed for           |
| ------------------------------- | ------------------------------------------------ | -------------------- |
| User account                    | Admin rights with access to hosts                | Reading host details |
| API token (version 7 and above) | Created on the API tokens page of the admin user | Token authentication |

## Create credentials in FortiNAC

{% stepper %}
{% step %}

### Version 6 and earlier: use a user account

Use an admin user that can access hosts. Enter its username and password.
{% endstep %}

{% step %}

### Version 7 and above: create an API token

1. Log in with your username and password.
2. Open the **API tokens** page under the admin user and generate a token.
3. Turn on **Use token** in OctoXLabs and paste the token.
   {% endstep %}
   {% endstepper %}

## Connection parameters

| Parameter             | Required              | Type             | Default | Description                                                       |
| --------------------- | --------------------- | ---------------- | ------- | ----------------------------------------------------------------- |
| Ip                    | Yes                   | Text             | None    | IP address of FortiNAC.                                           |
| Port                  | No                    | Integer          | 8443    | Port number.                                                      |
| Username              | When Use token is off | Text             | None    | Account name.                                                     |
| Password              | When Use token is off | Text (sensitive) | None    | Account password.                                                 |
| Use token             | No                    | Boolean          | False   | Use the API token. Needed for FortiNAC 7 and above.               |
| Api token             | When Use token is on  | Text (sensitive) | None    | API token.                                                        |
| Fetch network devices | No                    | Boolean          | False   | Also collect network devices. Advanced.                           |
| Is secure             | No                    | Boolean          | True    | Use SSL.                                                          |
| Timeout               | No                    | Integer          | 30      | Seconds to wait for API responses.                                |
| Thread count          | No                    | Integer          | 32      | Parallel threads. Minimum 1, maximum 32. Advanced.                |
| Sleep time            | No                    | Integer          | 0       | Seconds between thread batches. Increase it on rate limit errors. |

## Troubleshooting

| Error message                                                        | Cause                                   | Fix                                                        |
| -------------------------------------------------------------------- | --------------------------------------- | ---------------------------------------------------------- |
| `An API token is required for Fortinac version 7.0.0 or higher.`     | Use token is on but the token is empty. | Paste the API token.                                       |
| `FortiNAC page request failed, skipping page: <error>` (log warning) | One page request failed.                | Check the connection. The other pages are still collected. |

## Change history

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