---
title: "Configuring the Nodinite LDAP Web API: Product Key, Connection, Authentication, and Logging"
description: Configure the Nodinite LDAP Web API for secure, flexible integration. Learn how to set up product keys, connections, authentication, and logging for robust operations.
---

# :fa-edit: Configuring the Nodinite LDAP Web API

Set up your :Nodinite: [LDAP Web API][] for secure, flexible integration. This guide walks you through configuring product keys, connection information, authentication, and logging to ensure robust and compliant operations.

✅ Protect sensitive data with encrypted settings  
✅ Support multiple connections and authentication types  
✅ Enable detailed logging for traceability and compliance  
✅ Easily update product keys and manage licenses  

Before you use the :Nodinite: LDAP Web API, configure connectivity and optional logging options.

* [Product Key](#product-key)  
* [Connection information](#connection-information)  
* [Logging](#logging)  

You manage two configuration files:

* `appsettings.json` – product key and debug settings  
* `settings.json` – connection information (this file automatically encrypts sensitive data like passwords)  

![The appsettings.json and settings.json files in the LDAP Web API installation folder][1]  
*Screenshot: Example of appsettings.json and settings.json files for :Nodinite: LDAP Web API.*  

## :fa-diagram-project: Understanding the Configuration

The client sends the **Id** (a GUID) of a connection with every call. The [LDAP Web API][] looks up that Id in `settings.json`, binds to the directory with the connection's account, authentication type, server, and port, and runs the operations. `appsettings.json` holds the product key and the [Logging][] settings that apply to every call.

<div class="mermaid">
graph LR
    roClient["fa:fa-code Client<br/>sends connection Id"] -->|"HTTPS"| roAPI["fa:fa-cloud-arrow-up LDAP Web API"]
    roAPI -->|"reads"| roApp["fa:fa-file-code appsettings.json<br/>Product Key, Logging"]
    roAPI -->|"looks up Id"| roSettings["fa:fa-file-lock settings.json<br/>Connections"]
    roAPI -->|"DSAServer:DSAServerPort"| roLDAP["fa:fa-address-book LDAP Catalog Service"]
</div>

*Diagram: how the connection Id in a call selects a connection from settings.json, which the LDAP Web API uses to bind to the directory.*

|File|Holds|Encrypted|When you edit it|  
|---|---|---|---|  
|`appsettings.json`|Product Key (`CustomerName`, `Key`), [Logging][], debug settings|❌ No|At install, and when you renew the license every year|  
|`settings.json`|`Connections`: Id, server, port, account, password, authentication type|✅ Yes, the password, on first use|When you add or change a connection|  

## appsettings.json

Edit the `appsettings.json` file manually. Use [Notepad++][]<sup>:fa-arrow-up-right-from-square:</sup> or another text editor. Open the file with administrative privileges so you can save your changes.

### Product Key

You must provide the `CustomerName` and a `Key`. These are time-limited and you must exchange them every year.

You can buy a license from most of our [Partners][]<sup>:fa-arrow-up-right-from-square:</sup>. You can also contact us at [info@nodinite.com](mailto:info@nodinite.com) for guidance and recommendations to get started quickly.

## settings.json

Edit the `settings.json` file manually. Use [Notepad++][]<sup>:fa-arrow-up-right-from-square:</sup> or another text editor. Open the file with administrative privileges so you can save your changes.

### Connection information

`Connections` is a top-level array in `settings.json`. You can define any number of connections. The client/consumer provides this identity part of the call to the [LDAP Web API][].

You can use multiple accounts with different rights for different operations. As part of your API call, you send the **Id** of the configuration to use (a GUID).

```json
{
  "Connections": [
    {
      "Id": "5a95449b-95a6-4a9b-bfb4-f5292cbd3122",
      "AuthenticationType": 65,
      "DSAServer": "WILDWESTAD01",
      "DSAServerPort": 389,
      "UserName": "WildWest\\LDAPServiceAccount",
      "Password": "myverys3cretP4$$w0rd!"
    },
    {
      "Id": "6a95449b-95a6-4a9b-bfb4-f5292cbd3123",
      "AuthenticationType": 1,
      "DSAServer": "WILDWESTAD01",
      "DSAServerPort": 636,
      "UserName": "WildWest\\LDAPServiceAccount",
      "Password": "myverys3cretP4$$w0rd!"
    }
  ],
  "LogRequest": false,
  "LogResponse": false,
  "LogHttpHeaders": false
}
```

>[!NOTE]
>**Azure App Service:** put the same values in Azure App Configuration under the `LdapSettings` section, for example `LdapSettings:Connections:0:Id`, `LdapSettings:Connections:0:DSAServer`, and so on. See [Install - AppSettings][Azure AppSettings].

|Property|Required|Example|Description|  
|---|---|---|---|  
|[Id](#connection-id)|✅ Yes|5a95449b-95a6-4a9b-bfb4-f5292cbd3122|Any unique GUID|  
|[AuthenticationType](#authenticationtypes)|✅ Yes|65|Flags enum; must fit the port, see [AuthenticationType per port](#authenticationtype-per-port)|  
|[DSAServer](#dsaserver)|✅ Yes|WILDWESTAD01|String, DNS name|  
|[DSAServerPort](#dsaserverport)|✅ Yes|389|Positive integer|  
|UserName|✅ Yes|WildWest\\LDAPServiceAccount|String, user name for the connection to the LDAP Catalog Service|  
|Password|✅ Yes|myverys3cretP4$$w0rd!|String, the password for the user|  

>[!WARNING]
>`UserName` and `Password` are required. Empty values are sent to the domain controller as a real login and fail with *"The user name or password is incorrect"* (`0x8007052E`). Leaving them empty does **not** mean "use the application pool account".

>[!IMPORTANT]
>The password must be in clear text for first-time usage. The password will then be detected as plain text and will be **encrypted** on the first invocation of any operation (for example, run the search in [Test, Step 5][Test search]). The encryption locks the current configuration to the named account. If you change the user name or password, you must specify the password in clear text again, and it will be re-encrypted.

### AuthenticationTypes

The [AuthenticationTypes](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.authenticationtypes)<sup>:fa-arrow-up-right-from-square:</sup> is a flags enum, so you can combine several options by adding their values.

For example, the value **65** means **Secure** + **Signing**

|Value|Name|Description|  
|---|---|---|  
|0|None|Use basic authentication (simple bind) in the LDAP provider|  
|1|Secure|Request secure authentication. When set, the WinNT provider uses NTLM to authenticate the client. Active Directory Domain Services uses Kerberos, and possibly NTLM, to authenticate the client. When the user name and password are null, ADSI binds to the object using the security context of the calling thread, which is either the security context of the user account under which the application is running or of the client user account that the calling thread is impersonating|  
|2|Encryption/SecureSocketsLayer|[LDAPS][SSL] (SSL/TLS). Only works together with `1` (Secure) on port 636. Requires a certificate on the domain controller|  
|4|ReadonlyServer|For a WinNT provider, ADSI tries to connect to a domain controller. For Active Directory Domain Services, this flag indicates that a writable server is not required for a serverless binding|  
|16|Anonymous|No authentication is performed|  
|32|FastBind|Specifies that ADSI will not attempt to query the Active Directory Domain Services objectClass property. Therefore, only the base interfaces that are supported by all ADSI objects will be exposed. Other interfaces that the object supports will not be available. You can use this option to boost performance in a series of object manipulations that involve only methods of the base interfaces. However, ADSI does not verify if any of the request objects actually exist on the server. See "Fast Binding Option for Batch Write/Modify Operations" and the "Object-Class" topic in the [Active Directory documentation](https://learn.microsoft.com/en-us/windows/win32/ad/active-directory-domain-services)<sup>:fa-arrow-up-right-from-square:</sup>|  
|64|Signing|Verify data integrity to ensure that the data received is the same as the data sent. The System.DirectoryServices.AuthenticationTypes.Secure flag must also be set to use signing|  
|128|Sealing|Encrypt data using Kerberos. The System.DirectoryServices.AuthenticationTypes.Secure flag must also be set to use sealing|  
|256|Delegation|Enable Active Directory Services Interface (ADSI) to delegate the user's security context, which is necessary for moving objects across domains|  
|512|ServerBind|If your ADsPath includes a server name, specify this flag when using the LDAP provider. Do not use this flag for paths that include a domain name or for serverless paths. Specifying a server name without also specifying this flag results in unnecessary network traffic|  

#### AuthenticationType per port

The `AuthenticationType` must fit the `DSAServerPort`. The wrong combination fails with unclear errors:

|Port|✅ Works|❌ Fails|  
|---|---|---|  
|389 (LDAP)|`1` Secure, `65` Secure + Signing (recommended)|`2` or `3`: *"The server is not operational"*|  
|636 (LDAPS)|`1` Secure, `3` Secure + SSL|`2` alone: *"An operations error occurred"*; `65`: *"The server is not operational"*|  

`2` (SecureSocketsLayer, also named Encryption) means LDAPS and only works together with `1` on port 636. Don't use it on port 389.

#### How to enable LDAP signing in Windows Server

>[!IMPORTANT]
>Run as securely as possible!

Review the [How to enable LDAP signing in Windows Server](https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/enable-ldap-signing-in-windows-server)<sup>:fa-arrow-up-right-from-square:</sup> user guide

>[!TIP]
>You can significantly improve the security of a directory server by configuring the server to reject Simple Authentication and Security Layer (SASL) LDAP binds that do not request signing (integrity verification), or to reject LDAP simple binds that are performed on a clear text (non-SSL/TLS-encrypted) connection.

### Connection Id

The Id (a GUID) identifies this connection in the `Connections` array.

>Once you set this Id, only change it if you explicitly want client operations to fail. If you change this value, clients must also be updated to reflect the change.

Example: **5a95449b-95a6-4a9b-bfb4-f5292cbd3122**

### DSAServer

The `DSAServer` is usually the DNS name for the target domain controller for Active Directory. You may use an IP address for some operations, and also for some other LDAP Catalog services. Consult the documentation from that vendor for additional information.

Example: **WILDWESTAD01**

### DSAServerPort

The `DSAServerPort` is the TCP or UDP port to use for connecting with the LDAP Catalog Service. For Active Directory, the default is **389** or **636** for encrypted communication. The latter requires a valid certificate. Review the [SSL-LDAPS for Active Directory][SSL] user guide for additional information.

Example: **636**

>[!NOTE]
>The :Nodinite: LDAP products use additional TCP and UDP ports. The [firewall settings][LDAP Firewall] list every port per hop, and the [TCP and UDP ports][] user guide shows how to test them.

>[!TIP]
>Encrypt some operations, usually using port 636. Some operations are not supported using encrypted communication: `GetDomainControllers` and the Schema operations fail on a port 636 connection. The solution is to use different connections, using different ports.

## Logging

Review the '[Enable Logging][Logging]' user guide for more information.

## :fa-hand-point-right: Next Steps

:fa-vial: [Test][]  
:fa-code: [Develop][]  

## :fa-link-horizontal: Related Topics

:fa-square-plus: [Prerequisites][]  
:fa-rocket: [Install][]  
:fa-lock: [SSL-LDAPS for Active Directory][SSL]  
:fa-question: [Troubleshooting][]  

[1]:{ndm}/Documentation%20Pictures/LDAP%20WebAPI/Install/SettingsFiles.png

[Azure AppSettings]:{ndr}/LDAP%20Web%20API/Getting%20started/2.%20Install.md#appsettings
[Develop]:{ndr}/LDAP%20Web%20API/Getting%20started/4.%20Developing.md  
[Install]:{ndr}/LDAP%20Web%20API/Getting%20started/2.%20Install.md  
[LDAP Firewall]:{ndr}/LDAP%20Web%20API/Getting%20started/1.%20Prerequisites.md#fa-shield-check-what-firewall-settings-are-required-for-the-nodinite-ldap-web-api
[LDAP Web API]:{ndr}/LDAP%20Web%20API/Overview.md
[Logging]:{ndr}/LDAP%20Web%20API/Troubleshooting/Logging.md
[Notepad++]:https://notepad-plus-plus.org/downloads/
[Partners]:https://www.nodinite.com/partners/
[Prerequisites]:{ndr}/LDAP%20Web%20API/Getting%20started/1.%20Prerequisites.md
[SSL]:{ndr}/LDAP%20Web%20API/Troubleshooting/SSL-LDAPS%20for%20Active%20Directory.md
[TCP and UDP ports]:{ndr}/LDAP%20Web%20API/Troubleshooting/TCP%20and%20UDP%20ports.md
[Test]:{ndr}/LDAP%20Web%20API/Getting%20started/5.%20Test.md
[Test search]:{ndr}/LDAP%20Web%20API/Getting%20started/5.%20Test.md#fa-magnifying-glass-step-5-test-a-search
[Troubleshooting]:{ndr}/LDAP%20Web%20API/Troubleshooting/Overview.md