# Active Directory (LDAP)

## Active Directory LDAP

{% hint style="info" %}
Active Directory LDAP is a Directory Data Source integration. Data Source integrations are used during investigations to improve analysis and in interactive chat to help answer questions. They are optional, but enabling more tooling integrations enhances Dropzone analysis.
{% endhint %}

The Dropzone platform supports Active Directory (LDAP) to look up organizational information such as users, job titles, and devices.

Active Directory does require that you've enabled the [Dropzone Connector](https://gitlab.com/dropzone-ai/docs-gitbook/-/blob/main/docs.dropzone.ai/docs/overview/connector.md).

### Integration Overview

To enable these integrations you will perform the following actions:

* Create a read-only service account
* Grant the service account read access to users and computers
* Determine your LDAP Base DN (Distinguished Name)
* Install the credentials into your Dropzone tenant

### Create a Read Only Service Account

Dropzone will use an AD service account for authenticating to your AD LDAP. To create a Read Only Service Account, do the following:

* Open "Active Directory Users and Computers"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-9cdb4bd1497516afe867d5b592d12d7465c4d5ef%2Fad-ldap-00.png?alt=media" alt=""><figcaption><p>Open Active Directory Users and Computers</p></figcaption></figure>

* Right click on the container of your choice, such as "Users", and click New > User

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-bc8e49078f04d1bae4a7fb0e68e4c23411f6d61c%2Fad-ldap-01.png?alt=media" alt=""><figcaption><p>Right Click New User</p></figcaption></figure>

* Give it a first/last/full name
* Give it a User Logon Name, such as *svc-dropzone@*

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-004344d5a12467063890d54e3f3418cd95c719ca%2Fad-ldap-02.png?alt=media" alt=""><figcaption><p>New User Details</p></figcaption></figure>

* Record this User Logon Name for use later in the Dropzone UI where it is called "User"
* Click Next
* Provide a strong password and record it for use later in the Dropzone UI where it is called "Password"
* Uncheck "User must change password at next login"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-9c957f68df73658af4f99c54ae68da2de06af40f%2Fad-ldap-03.png?alt=media" alt=""><figcaption><p>Password Settings</p></figcaption></figure>

{% hint style="info" %}
If you have a corporate-wide password rotation policy you should either disable it for this user, or you will want to change the password periodically in AD and update the Dropzone integration with the new password to stay within your organizational policy
{% endhint %}

* Click "Next"
* Click "Finish"

### Apply Active Directory Permissions to the Service Account

Next, we will grant permissions to the service account. Most customers will apply this at the top of the forest so Dropzone has the most visibility into users/devices/etc, but you may pick a lower level if you wish to limit the scope.

* Open "Active Directory Users and Computers"
* Click "View" from the menu bar, and make sure "Advanced Features" is selected
* Right click the top of your forest and select "Properties"
* Select the "Security" tab and click "Add"
* Type the name of the service account you created (e.g. *svc-dropzone@*) and click OK to search

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-115d984b05068b4026068a90975b92a2a8483612%2Fad-ldap-04.png?alt=media" alt=""><figcaption><p>Granting Permissions to the Service Account</p></figcaption></figure>

* Highlight the service account and click "Advanced"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-1d63e807f60bc3c269c58a58d4192a5069075dd5%2Fad-ldap-05.png?alt=media" alt=""><figcaption><p>Permissions to the Service Account (Continued)</p></figcaption></figure>

* In the "Permissions" tab, select the service account again and click "edit"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-fdc7518a4a1789813fcbccd3fd57c5bcc521ab74%2Fad-ldap-06.png?alt=media" alt=""><figcaption><p>Permissions to the Service Account (Continued)</p></figcaption></figure>

* Set read for users
  * Set the "Applies to" dropdown to "Descendant User Objects" so the service account can see all objects in the hierarchy
  * In the Permissions section, make sure "Read All Properties" is checked
  * In the Properties section, make sure "Read All Properties" is checked (this is further down the page)

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-7c6bfe4b801a76f3c944ea4351c243823b6bc28a%2Fad-ldap-07.png?alt=media" alt=""><figcaption><p>User Settings</p></figcaption></figure>

* Set read for devices
  * Set the "Applies to" dropdown to "Descendant Computer Objects" so the service account can see all objects in the hierarchy
  * In the Permissions section, make sure "Read All Properties" is checked
  * In the Properties section, make sure "Read All Properties" is checked (this is further down the page)
* Click the "OK" button to save

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-59905991becf559a2eb8601b2e25ab5ac8c393c1%2Fad-ldap-08.png?alt=media" alt=""><figcaption><p>Device Settings</p></figcaption></figure>

{% hint style="info" %}
Note that device querying via LDAP is not yet supported in Dropzone AI
{% endhint %}

## Determine The Service Account User Name

* In Active Directory Users and Computers, find the service account just created
* Right click on it and select Properties

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-338a2bda271101bdcec36469c885f5de770226cc%2Fad-ldap-09.png?alt=media" alt=""><figcaption><p>The Service Account</p></figcaption></figure>

* Click "Attribute Editor" in the tabs at the top
* Scroll down to the "distinguishedName" field

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-57c3b1a92314c9bbcb10eb725ea0123e4ed30449%2Fad-ldap-10.png?alt=media" alt=""><figcaption><p>The distinguishedName</p></figcaption></figure>

* Double click it to pop it out
* Record the full value of the distinguishedName field for use later in the Dropzone UI where it is called "Distinguished Name"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-4f6196f16c8321c2b564966e49fe2850ade87ce7%2Fad-ldap-13.png?alt=media" alt=""><figcaption><p>The User Distinguished Name</p></figcaption></figure>

## Determine your LDAP Base DN (Distinguished Name)

Your Base DN typically is based on your domain name, with `DC=` between each of the domain component. For example if your domain is *example.com* then the Base DN is likely `DC=example,DC=com`.

If you do not already know your Base DN, you can find it as follows:

* In Active Directory Users and Computers, find the service account you created
* Right click on it and select "Properties"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-338a2bda271101bdcec36469c885f5de770226cc%2Fad-ldap-09.png?alt=media" alt=""><figcaption><p>The Service Account</p></figcaption></figure>

* Click "Attribute Editor" in the tabs at the top
* Scroll down to the "Distinguished Name" field

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-57c3b1a92314c9bbcb10eb725ea0123e4ed30449%2Fad-ldap-10.png?alt=media" alt=""><figcaption><p>The Distinguished Name</p></figcaption></figure>

* Double click it to pop it out
* Record the part that starts with `DC=` for use later in the Dropzone UI where it is called the "Base DN"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-18b923107f40b0917e20608a125960959e4d2e1a%2Fad-ldap-11.png?alt=media" alt=""><figcaption><p>The Base DN</p></figcaption></figure>

## Enable Active Directory LDAP

The Data source integration allows Dropzone AI to look up organizational information.

To enable the Data Source integration, you will need the following information:

| Dropzone Field     | Source                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------ |
| Server             | The IP address or name of the AD server, in the format of `ldap://` followed by your server name or IP |
| Distinguished Name | The User info you copied from the service account's `DistinguishedName` found in Active Directory      |
| Password           | The service account password you set above                                                             |
| Base DN            | The LDAP DN of your Active Directory                                                                   |

To enable the Data Source integration, do the following:

* Navigate to your Dropzone AI tenant home page e.g. https\://*mycompany*.dropzone.app
* In the bottom left hand corner, click Settings > Integrations

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-b3f07f902b1402dadc7abbd8bb62f9c204547390%2Fui-integrations-dropdown.png?alt=media" alt=""><figcaption><p>Integrations Dropdown</p></figcaption></figure>

* Click "Available"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-434641ec6d4e45051842f86164f485d6bd289424%2Fapp_system_integrations_available.png?alt=media" alt=""><figcaption><p>Click Available</p></figcaption></figure>

* In the Search bar, search Active Directory, then click "Configure"

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-cddcac82e113423cb4a319dac6b9fc979bf8ca05%2Fapp_system_integrations_available_Active_Directory.png?alt=media" alt=""><figcaption><p>The Active Directory Data Tile</p></figcaption></figure>

* If your Active Directory integration is behind an [On-premise Dropzone Connector](https://docs.dropzone.ai/platform/settings/connector), select your connector from the dropdown
* Input the Base DN fields for searches
* Input the service account user's Distinguished name and Password
* Input the server
* Click "Test & Save" to finish

<figure><img src="https://435022081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBVcKuiytGCsIDpL70BC%2Fuploads%2Fgit-blob-5ef4c7e7ad50364be7172cec048007ac04aedc16%2Fui-active-directory-data-source-full.png?alt=media" alt=""><figcaption><p>The Active Directory Data Source Configuration</p></figcaption></figure>

If you have any errors engage your Dropzone AI support representative.
