Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit b938633 · 19 days ago
Project

AD PhoneBook: company phone directory from Active Directory — site and Lite version in one script

🌐 Machine-translated from Russian. Show original

AD PhoneBook is the company's phone directory that draws employees directly from Active Directory. It is deployed internally: no need for internet, external services, or a database. Employee data does not leave your network.

🔒 Since 17.11.2026, the source code of the AD Tools series is provided upon request: leave a request. The showcase of the series is github.com/WorkTime-kz/ad-tools.

The project has two versions: a full-fledged website for the server and Lite — one PowerShell script "for the laziest."

Link
🖥️Full version — site on the server
⚡Lite — one script, one HTML file,

Интерфейс AD PhoneBook на демо-данных

In this part:

What's New (November 2026)#

  • 🧩 Common ad-tools-core kernel. AD connection, login, sessions, limits, and logging are now common across the entire AD Tools series (folder src/core/). A fix in the kernel is entered into the directory with the npm run sync-corecommand, and npm test checks that the kernel was not manually edited.
  • 🪟 Login via Windows (Kerberos/SPNEGO) without a password from the domain computer — either in the service itself or on IIS/Apache. Status: verified on Samba AD, on Windows Server AD, and in browsers — not yet, so disabled by default; the usual sign-in form remains a fallback path.
  • 🇰🇿 Interface in Russian and Kazakh: toggle "Rus | Қаз" on each page, language by browser settings with memory, dates and numbers in the format of the selected language. Kazakh translation prepared using AI — edits by native speakers are welcome.
  • 🏖️ Who is on vacation — a bundle with AD Absence: in the card "On vacation until November 20, replaced by Kim V. S.", filter "Only on site".
  • ✅ CI on GitHub Actions: unit tests for Node.js 20 and 22 on Linux and Windows and integration tests against real Samba AD on the ad-testlab booth — login via UPN and ДОМЕН\логин, nested groups, disabled and locked accounts, page-by-page uploading, check-ldap.
  • 📦 Installing the entire series at once — ad-tools-suite: one configuration file instead of fifteen .env, HTTPS, and the phonebook.corp.local type name via Caddy, summary check. The token for linking with AD Absence is created by the generator itself, and if the set includes an ad-portal portal — it specifies the directory address and enables the directory in a no-login mode (AUTH_MODE=none).
  • ⚡ Lite: Kazakh language (-Language ru|kk and the "Rus / Қаз" switch right on the page) and CI on GitHub Actions — encoding and syntax in PowerShell 5.1 and 7, demo test, and PSScriptAnalyzer.

Why#

In most companies, the "directory" is an Excel file that was updated last year. At the same time, current full names, positions, departments, and phone numbers are already in Active Directory: they are kept during hiring and dismissal. AD PhoneBook simply shows this data to employees conveniently — without double entry.

Full version: site on the server#

What they can do:

  • 🔄 Synchronization with AD over an encrypted connection (LDAPS or StartTLS) once every N minutes, default every 15. Multiple domain controllers with failover and page unloading for large domains. AD is read-only.
  • 🔍 Instant search by full name, position, department, e-mail, and any part of the number. Case and "ё" do not matter; the layout corrects itself: bdfyjd → "Ivanov."
  • 🏢 Filters by departments and cities with the number of employees.
  • 👤 Employee card: internal, work, and mobile numbers, mail, office, manager and subordinates, photo from AD. The number or email can be copied with one click.
  • 🏖️ Who is on vacation (optional, with AD Absence): status, dates, and deputy in the card, filter "Only on site."
  • 📤 Export: contact in vCard for phone and Outlook, list in Excel (CSV), printing.
  • 🔗 Search links, departments, or cards can be sent to a colleague.
  • 🔐 Domain password login is optional, with access only for AD group members. Login — ivanov, ivanov@corp.local , or CORP\ivanov.
  • 🪟 Optional Windows (Kerberos) login is experimental, see above.
  • 🇰🇿 Russian and Kazakh interface.
  • 🌓 Light and dark themes, works on the phone.

Security: passwords are not stored anywhere, protected headers (including CSP), login attempts limited, CSV formula protection. One dependency is the ldaptslibrary, no frontend builds and no CDN.

Where it takes place:

PlatformHow
Windows ServerWindows service (WinSW, LocalService)
Linuxsystemd service
Dockerdocker compose up -d --build
HTTPSembedded (PFX or CRT+KEY) or via nginx
The entire AD Tools seriesad-tools-suite: Docker, Windows Server, or Linux for Caddy

Try it without AD — demo for 50 test employees:

npm ci
npm run demo        # http://localhost:8080

For your domain — fill in the .env and check connection with the npm run check-ldapcommand: it states the cause of the error in clear text. The repository has detailed step-by-step instructions: preparing data in AD, service account, LDAPS verification, installation on Windows Server, Linux, and Docker, DNS name, HTTPS, domain password login, assigning a shortcut via Group Policies, usage, error table, security checklist, link to AD Absence, common kernel parameters, and a separate document about Windows login (Kerberos).

Requirements: Node.js 20.12+ or Docker, domain controller access via ports 636/389.

Lite: for the laziest#

Don't want to install a server? Lite is a single phonebook.ps1file. No installation, settings, or passwords: the script finds the domain itself, reads employees, and collects one HTML file with a search, which can be placed on a shared drive.

powershell -ExecutionPolicy Bypass -File .\phonebook.ps1

To have the file update on its own, run as administrator:

powershell -ExecutionPolicy Bypass -File .\phonebook.ps1 -OutFile "\\fs01\Public\Справочник.html" -Install

The script will create a scheduler task that rebuilds the file every hour on behalf of the computer account — no password required.

Inside the file: search by full name, position, department, office, email, and number with layout correction, filter by departments, manager and internal number, "call" and "write" links, topics, mobile version and print, Russian and Kazakh interface with toggle "Rus / Kaz". Only enabled accounts with phone or mail are shown.

Options (all optional): -Title, -SearchBase — only the required OU, -Photos — embed photos, -NoMobile — hide mobile, -Language ru or kk — default language (no parameter — according to Windows regional settings), -EveryMinutes — update period, -Demo — view without AD.

Which version to choose#

LiteFull
Installinga single scriptserver: Windows, Linux, or Docker
Updatedata on a schedule, by default once an hourevery 15 minutes
Login with domain passwordnone — the file can be seen by anyone with folder accessyes, with AD group restrictions; Windows login is experimental
Cards, vCard, Excelnoto
Who is on leave (AD Absence)notyes, optional
Interface languageRussian and KazakhRussian and Kazakh
Startup time2 minuteslonger: service account, LDAPS, HTTPS,

Lite — to quickly give employees a reference today. Full — when you need a closed site with cards, export, and frequent updates.

Project status#

  • Both versions are under the GPL-3.0 license; the source code is available upon request.
  • Full version: 30 autotests on Node.js 20 and 22 on Linux and Windows and an integration run against the real Samba AD on the ad-testlab stand with each push.
  • Lite: CI checks encoding, syntax, and demo mode; reading real AD in CI cannot be checked, so there is a manual verification instruction for the domain.
  • Working with Windows Server AD in production has not yet been tested — so we are looking for administrators willing to try it themselves and share what they have achieved.

How to help#

  • ⭐ Give a star to the ad-tools showcase if the project is useful.
  • 🧪 Try it on your domain (start with npm run check-ldap or -Demo) and write in the comments what worked and what didn't.
  • 🇰🇿 Correct the Kazakh translation (public/i18n/kk.json in the full version, dictionary $Strings in Lite).
  • 🛠️ Questions and access requests — through the Issues storefront; after gaining access, send issues and pull requests to the service repository.

👉 Full version: source code — upon request, leave a request. Series showcase — github.com/WorkTime-kz/ad-tools
👉 Lite: source code — upon request, leave a request. Series showcase — github.com/WorkTime-kz/ad-tools

Looking for:тестировщики с реальным ADконтрибьюторыобратная связь от админов
Comments 00 участников · 2 гостя🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.