> 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/i/ivanti-application-control.md).

# Ivanti Application Control

Ivanti Application Control controls which applications can run on endpoints. OctoXLabs reads agent rows from its SQL Server database and adds them as devices.

## Use cases

* List the devices OctoXLabs collected from Ivanti Application Control.

```
Adapters = ivanti-application-control
```

* Find devices that Ivanti Application Control reports but your EDR does not cover.

```
Adapters = ivanti-application-control AND NOT Adapters = falcon-crowdstrike
```

* Check what one connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                                                   | Port                | Protocol         |
| ------------------- | ------------------------------------------------------------- | ------------------- | ---------------- |
| OctoXLabs connector | SQL Server that hosts the Ivanti Application Control database | 1433 (configurable) | TDS (SQL Server) |

With Auth Type Kerberos, the connector also needs to reach the Kerberos Key Distribution Center (usually the domain controller). The port is Not verified.

### Required permissions

| Scope or role                                                                     | Permission            | Needed for                             |
| --------------------------------------------------------------------------------- | --------------------- | -------------------------------------- |
| SQL Server login with the Ivanti Application Control database as default database | Read, Select and List | Running the query that returns devices |

## Create credentials in Ivanti Application Control

{% stepper %}
{% step %}

### Create the SQL Server login

Open SQL Server Management Studio and choose the authentication mode the server uses. Fill in the user details and select the Ivanti Application Control database as **Default Database**, then save the user.
{% endstep %}

{% step %}

### Grant read access

Give the user Read, Select and List privileges on the data the query reads.
{% endstep %}

{% step %}

### Sign in once

Log in to the database with this user once to avoid an error.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
To use Active Directory credentials, set Auth Type to `Kerberos`. In Kerberos Mode `password`, the Username and Password fields are used to get a ticket. In Kerberos Mode `keytab`, upload a keytab file generated with `ktpass` on a domain controller and leave Password empty.
{% endhint %}

## Connection parameters

| Parameter                | Required    | Type    | Default  | Description                                                                                                              |
| ------------------------ | ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| IP or Domain             | Yes         | String  | None     | Address of the SQL Server. The serializer field is named `ip`.                                                           |
| Port                     | No          | Integer | 1433     | SQL Server port.                                                                                                         |
| Domain                   | No          | String  | None     | Domain name. When set, the login is sent as `DOMAIN\username`.                                                           |
| Database                 | Yes         | String  | None     | Name of the database to connect to.                                                                                      |
| Username                 | Yes         | String  | None     | SQL Server login, or the Kerberos principal.                                                                             |
| Password                 | Conditional | String  | None     | Required for SQL authentication and for Kerberos Mode `password`. Can be empty for Kerberos Mode `keytab`.               |
| View Name                | No          | String  | None     | Name of a view. The adapter runs `SELECT * FROM <view name>`.                                                            |
| Custom Query             | No          | String  | None     | Full SQL query. It takes priority over View Name.                                                                        |
| Use Default Query        | No          | Boolean | False    | Run the default query when Custom Query and View Name are empty.                                                         |
| Query Timeout            | No          | Integer | 60       | Seconds before a query is stopped.                                                                                       |
| Batch Size               | No          | Integer | 300      | Rows fetched per batch.                                                                                                  |
| Use PyODBC Driver        | No          | Boolean | False    | Use pyodbc instead of pymssql. ODBC Driver 17 or 18 for SQL Server must be installed. Driver 17 is tried first, then 18. |
| Auth Type                | No          | String  | SQL      | `SQL` or `Kerberos`.                                                                                                     |
| Kerberos Mode            | No          | String  | password | `password` or `keytab`.                                                                                                  |
| Kerberos Realm           | No          | String  | None     | Active Directory realm in uppercase. Can be empty when the username is in UPN form.                                      |
| KDC IP                   | No          | String  | None     | Key Distribution Center host or IP.                                                                                      |
| Kerberos SPN             | No          | String  | None     | Service principal name override, for example `MSSQLSvc/sqlserver.corp.local:1433`.                                       |
| Keytab                   | Conditional | String  | None     | Required when Kerberos Mode is `keytab`.                                                                                 |
| Encrypt                  | No          | Boolean | True     | TLS between connector and SQL Server. Used with Kerberos.                                                                |
| Trust Server Certificate | No          | Boolean | True     | Skip certificate chain validation. Used with Kerberos.                                                                   |

The adapter runs the first of these that is set: Custom Query, then `SELECT * FROM <View Name>`, then the default query when Use Default Query is on. When none is set, no devices are fetched.

Default query:

```
SELECT NetBiosName, DNS, IP_Address, Operating_System, Platform, RAM, HDD, CPU, GroupName, LastPollTime, LastUploadTime, Offline FROM OzetTablo
```

## Troubleshooting

| Error message                                                                                                     | Cause                                                           | Fix                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------- |
| No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.                                | Use PyODBC Driver or Kerberos is on and no driver is installed. | Install ODBC Driver 17 or 18 for SQL Server on the connector host.      |
| Kerberos config failed: SQL Server reports auth\_scheme=''. Check SPN registration in AD and the Encrypt setting. | The connection worked but SQL Server did not use Kerberos.      | Check the SPN registration in Active Directory and the Encrypt setting. |
| Password is required for SQL Server Authentication.                                                               | Auth Type is SQL and Password is empty.                         | Enter a password.                                                       |
| Keytab is required when kerberos\_mode is 'keytab'.                                                               | Kerberos Mode is `keytab` and no keytab was uploaded.           | Upload the keytab.                                                      |
| Password is required when kerberos\_mode is 'password'.                                                           | Kerberos Mode is `password` and Password is empty.              | Enter a password.                                                       |

## Change history
