> 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/m/microsoft-mbam-sccm.md).

# Microsoft MBAM SCCM

Microsoft BitLocker Administration and Monitoring (MBAM) data is stored in the Microsoft Endpoint Configuration Manager (SCCM) site database. OctoXLabs reads BitLocker volume status for each device from that database and adds it to the device inventory.

## Use cases

* Find devices that report BitLocker volumes in Configuration Manager.

```
Adapters = mbam-sccm
```

* Find devices seen by MBAM-SCCM but missing from your EDR coverage.

```
Adapters = mbam-sccm AND NOT Groups = edr
```

## Before you begin

### Network

| Source              | Destination                                                | Port                          | Protocol |
| ------------------- | ---------------------------------------------------------- | ----------------------------- | -------- |
| OctoXLabs connector | SQL Server host of the Configuration Manager site database | 1433 (or the configured port) | TCP      |

### Required permissions

| Scope or role      | Permission | Needed for                                                                                                             |
| ------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| Read, Select, List | Read       | Devices and the SQL Server instance                                                                                    |
| Select             | Read       | Views `v_GS_ENCRYPTABLE_VOLUME`, `v_R_System`, `v_GS_COMPUTER_SYSTEM` (and `v_GS_LOGICAL_DISK` for the enriched query) |

For BitLocker management in Configuration Manager itself, the Configuration Manager role must be Full Administrator. The view names come from the connector code, the permission level comes from the frontend instructions.

## Create credentials in Microsoft MBAM-SCCM

{% stepper %}
{% step %}

### Open SQL Server Management Studio

Connect to the SQL Server instance that hosts the Configuration Manager database.
{% endstep %}

{% step %}

### Create a login

Go to Security, right-click Login, and select New Login. Select the authentication method your server uses.
{% endstep %}

{% step %}

### Set the default database

Enter the login details and select the Configuration Manager database as Default Database. The database name must begin with `cm_`.
{% endstep %}

{% step %}

### Grant read access

Give the login Read, Select and List permissions on the devices and the SQL Server instance.
{% endstep %}

{% step %}

### Sign in once

Log in to the database with the new user once to avoid a first-login error.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                                             | Required    | Type    | Default  | Description                                                                                                                                                                                                                          |
| ----------------------------------------------------- | ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| IP (`ip`)                                             | Yes         | String  |          | IP address or hostname of the SQL Server host.                                                                                                                                                                                       |
| Port (`port`)                                         | No          | Integer | 1433     | SQL Server port.                                                                                                                                                                                                                     |
| Domain (`domain`)                                     | No          | String  |          | Windows domain. When set, the login is sent as `DOMAIN\username`.                                                                                                                                                                    |
| Database (`database`)                                 | Yes         | String  |          | Name of the database to connect to.                                                                                                                                                                                                  |
| Username (`username`)                                 | Yes         | String  |          | Account used to connect.                                                                                                                                                                                                             |
| Password (`password`)                                 | Conditional | String  |          | Required for SQL authentication and for Kerberos mode `password`. Optional for Kerberos mode `keytab`.                                                                                                                               |
| Use PyODBC Driver (`use_pyodbc_driver`)               | No          | Boolean | False    | Use pyodbc instead of pymssql. The connector tries ODBC Driver 17, then ODBC Driver 18.                                                                                                                                              |
| Batch Size (`batch_size`)                             | No          | Integer | 300      | Rows fetched per batch.                                                                                                                                                                                                              |
| Query Timeout (`query_timeout`)                       | No          | Integer | 60       | Query timeout in seconds.                                                                                                                                                                                                            |
| Auth Type (`auth_type`)                               | No          | String  | SQL      | Set to `Kerberos` to authenticate with Active Directory.                                                                                                                                                                             |
| Kerberos Mode (`kerberos_mode`)                       | No          | String  | password | `password` requests a ticket with username and password. `keytab` uses an uploaded keytab.                                                                                                                                           |
| Kerberos Realm (`kerberos_realm`)                     | No          | String  |          | Active Directory realm in uppercase. Can be empty when the username is in UPN format.                                                                                                                                                |
| KDC IP (`kdc_ip`)                                     | No          | String  |          | Key Distribution Center host or IP.                                                                                                                                                                                                  |
| Kerberos SPN (`kerberos_spn`)                         | No          | String  |          | Service Principal Name override.                                                                                                                                                                                                     |
| Keytab (`keytab`)                                     | Conditional | String  |          | Required when Kerberos Mode is `keytab`.                                                                                                                                                                                             |
| Encrypt (`encrypt`)                                   | No          | Boolean | True     | TLS encryption. Applied only when Auth Type is Kerberos.                                                                                                                                                                             |
| Trust Server Certificate (`trust_server_certificate`) | No          | Boolean | True     | Skip certificate chain validation. Applied only when Auth Type is Kerberos.                                                                                                                                                          |
| Custom Query (`custom_query`)                         | No          | SQL     |          | Custom SQL that replaces the built-in query. Must be a single read-only SELECT or WITH statement.                                                                                                                                    |
| Default Query (`default_query`)                       | No          | String  | standard | `standard` or `enriched`. The enriched query needs the columns ConversionStatus0, EncryptionPercentage0 and EncryptionMethod0 in `v_GS_ENCRYPTABLE_VOLUME`. These are not collected by default and need extended hardware inventory. |

## Troubleshooting

| Error message                                                                                                     | Cause                                                                                        | Fix                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.                                | Pyodbc is enabled or Kerberos is used and neither driver is installed on the connector host. | 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 fell back from Kerberos, for example to NTLM.                                 | Check the SPN registration in Active Directory and the Encrypt setting. |
| Password is required for SQL Server Authentication.                                                               | Auth Type is not Kerberos and Password is empty.                                             | Enter the password.                                                     |
| Keytab is required when kerberos\_mode is 'keytab'.                                                               | Kerberos mode is keytab and no keytab was uploaded.                                          | Upload the keytab file.                                                 |
| Password is required when kerberos\_mode is 'password'.                                                           | Kerberos mode is password and Password is empty.                                             | Enter the password.                                                     |

## Change history
