# Debugging LDAP Settings

> If you regard any issues with the LDAP settings when you are using in **UiPath Process Mining**, you can debug the LDAP settings. Debugging need to be done on the server where you are setting up LDAP, for instance a production server.

## Introduction

If you regard any issues with the LDAP settings when you are using in **UiPath Process Mining**, you can debug the LDAP settings. Debugging need to be done on the server where you are setting up LDAP, for instance a production server.

### Connecting to the Server

Follow these steps to connect to the server using `ldp.exe`.

| Step | Action |
| --- | --- |
| 1 | Connect to the server using, for example, remote desktop. |
| 2 | On the server, search for `ldp.exe` and double click to start the tool. |
| 3 | Go to the **Connection** menu and select **Connect…**. |
| 4 | Enter the name server name where the AD is hosted. |
| 5 | Depending on the server, you might also need to change the port number and enable SSL. Some common port numbers are 389, 636, 3268, and 3269. |
| 6 | Click on **OK**. |

If you have a connection to the server, `ldp.exe` will show information about the server. In the title bar the following details you need to use are displayed: the url the base of the `ldap` setting in **UiPath Process Mining**.

See illustration below.

![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-docs-image-58889-f55e2100-21e645f6.webp)

If there are issues connection to the server, these are displayed in the `ldp.exe` window. You can use this information to fix connection problems.

### Testing the LDAP Bind User

Once successfully connected, you can test the user you will use in the LDAP setting.

Follow these steps to test the LDAP user.

| Step | Action |
| --- | --- |
| 1 | Go to the **Connection** menu and select **Bind…**. |
| 2 | Enter the details of the user and select **Bind with credentials**. |
| 3 | Click on **OK**. |

A message is displayed to indicate whether the bind was successful. See illustration below.

![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-docs-image-56441-4a7afa3e-71f9d5c9.webp)

If there are any authentication issues, these are displayed as well. Use this information to fix the authentication issues.

### Adapting LDAP Settings in UiPath Process Mining

Go to the **Settings** tab of the **Superadmin** page of your **UiPath Process Mining** installation.

The user defined in the `bindDN` property of the `ldap` Server setting must be the user displayed as the ‘Authenticated as’ user in `ldp.exe`. This might include `“DOMAINNAME\”` as a prefix.

:::note
In **UiPath Process Mining** you need to use a double backslash for the domain name prefix, for example `PGDCTEST\\ estuser`. See illustration below.
:::

You can use the information from `ldp.exe` in the `ldap` Server setting in **UiPath Process Mining**.

See illustration below for an example.

```
"ExternalAuthenticationProviders": {
    "ldap": {
            "url":             "ldap://PROCESSGOLDTEST.pgdctest.local:389",
            "base":            "DC=pgdctest,DC=com",
            "bindDN":          "PGDCTEST\)\)\)    estuser",
            "bindCredentials": "Passw0rd!",
              }
}
```

## Debugging AD Group DN

If a specific superadmin user still has problems logging in, verify that the correct AD group is added as a user. You can find the correct AD group using the command prompt in Windows with the `dsquery` command.

:::note
This query must be executed from a server on the domain.
:::

Below is an example of finding the correct AD group for the username “Test User”. In the command prompt, use the following command:

`dsquery user -name "Test User"`

This will give you the DN of the user:

![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-docs-image-54368-c4f93e40-b56246c6.webp)

You can now use `dsquery` again to find the AD groups you can use in **UiPath Process Mining**:

`dsquery * "CN=Test User,CN=users,dc=pgdctest,dc=local" -attr memberOf`

![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-docs-image-54780-9e9c6d97-cd47c7e2.webp)

Any of the groups can now be used in **UiPath Process Mining**. In this example the groups are:

* `CN=Enterprise Admins,CN=Users,DC=pgdctest,DC=local`
* `CN=Administrators,CN=Builtin,DC=pgdctest,DC=local`
