> For the complete documentation index, see [llms.txt](https://lewe.gitbook.io/teamcal-neo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lewe.gitbook.io/teamcal-neo/administration/ldap-authentication.md).

# LDAP Authentication

Edit the `config/config.app.php` file and scroll down to the LDAP section (around line 115).

There you will find all settings that you need to adjust in order to reflect the LDAP server that you want to use. For example:

```php
define('LDAP_YES', 1);                                       // Use LDAP authentication
define('LDAP_ADS', 0);                                       // Set to 1 when authenticating against an Active Directory
define('LDAP_HOST', "ldap.forumsys.com");                    // LDAP host name
define('LDAP_PORT', "389");                                  // LDAP port
define('LDAP_PASS', "password");                             // SA associated password
define('LDAP_DIT', "cn=read-only-admin,dc=example,dc=com");  // Directory Information Tree (Relative Distinguished Name)
define('LDAP_SBASE', "dc=example,dc=com");                   // Search base, location in the LDAP directory to search
define('LDAP_TLS', 0);                                       // To avoid "Undefined index: LDAP_TLS" error message for LDAP bind to Active Directory
define('LDAP_CHECK_ANONYMOUS_BIND', 0);                      // Set to 1 to check the LDAP server's 'anonymous bind' setting. Connection will be refused if not allowed.
```

The TeamCal Neo distribution comes with a sample configuration for a free online LDAP server at forumsys. Several users exist there that you can test with.

The sample database that comes with TeamCal Neo contains a user with username 'einstein'. In the TeamCal Neo database this user has the password 'Qwer!1234'.

This user also exists in the forumsys LDAP server with password 'password'. Once you set LDAP\_YES to 1 with the sample configuration, you can login with einstein/password.

{% hint style="info" %}
Note, that the 'admin' user will always authenticate against the TeamCal Neo database.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lewe.gitbook.io/teamcal-neo/administration/ldap-authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
