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 c685527 · 15 days ago
Project

AD Birthdays: birthdays and anniversaries working from Active Directory — a site with morning mailings and a Lite script

🌐 Machine-translated from Russian. Show original

AD Birthdays is a "Birthdays and Anniversaries" service for the company's local network. Employees and dates are taken directly from Active Directory, and in the morning the service can send a summary to email or messenger. No internet, external services, or a database are needed.

🔒 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 server site and Lite — a single PowerShell script that assembles an HTML file.

Link
🎂Repository — website, mailing list, and Lite script (lite/birthdays.ps1)

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

In this part:

What's New (November 2026)#

  • 🧩 Common ad-tools-core kernel. Connecting to AD, login, sessions, limits, log, as well as sending via SMTP and Telegram are now common across the entire AD Tools series (folder src/core/). A fix in the kernel is sent to the service by 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: switch "Rus | Қаз" on each page, language by browser settings with memory, dates and numbers in the selected language format. The text of the morning newsletter is set by templates in .env (default in Russian). The Kazakh translation is prepared using AI — edits by native speakers are welcome.
  • ✅ 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 a birthdays.corp.local type name via Caddy, summary check. If the set includes an ad-portal, the generator specifies the service address to the portal and enables a no-login mode for birthdays (AUTH_MODE=none).

Why#

Usually, one person in HR remembers colleagues' birthdays, and the others learn about them from the general chat—by lunch or the next day. At the same time, full names, positions, and departments are already in Active Directory. AD Birthdays adds their date of birth and start date and shows everyone who to congratulate today—and if desired, writes about it in the morning by email or messenger.

Site on the server#

What they can do:

  • 📅 Today, this week, this month — three blocks on the main page. On Monday, you can also see those who need to be congratulated for the weekend. There is a monthly viewing and filters by department, event type, and name. Photo — from thumbnailPhoto.
  • 🎂 Date of birth from any AD attribute (BIRTHDAY_ATTRIBUTE, for example extensionAttribute1) in ДД.ММ, ДД.ММ.ГГГГ , or ГГГГ-ММ-ДДformats. The year of birth is never displayed: it is discarded when read and does not go to the browser.
  • ⭐ Anniversary anniversaries — 1, 3, 5, 10, 15... years, the list is customizable. The start date is taken from a separate attribute, and if none is missing — from whenCreated (with reservations described in the instructions).
  • 🙈 Unseeing: an employee from the AD group (nested groups are counted) is not visible either on the page or in the mailing.
  • 🔄 Synchronization with AD via LDAPS or StartTLS, multiple domain controllers with failover in case of failure, page-by-page unloading.
  • 🔐 Domain password login is optional, with access only for AD group members.
  • 🪟 Optional Windows (Kerberos) login is experimental, see above.
  • 🇰🇿 Russian and Kazakh interface.
  • 🌓 Light and dark themes, works on the phone.

Security: AD is read-only, passwords are not stored anywhere, minimal fields are used in the browser. Strict CSP, webhook secrets are hidden in the log, SMTP password is not sent without encryption. One dependency is the ldaptslibrary; SMTP client is built-in, no frontend build and no CDN.

Morning mailing#

Mailing is disabled by default and is enabled in .env. Channels — multiple can be done simultaneously:

  • ✉️ Mail via internal SMTP-relay (STARTTLS, authorization);
  • 💬 webhooks Mattermost, Microsoft Teams (Workflows), and Telegram.
DIGEST_ENABLED=true
DIGEST_TIME=09:00
DIGEST_DAYS=1,2,3,4,5        # пн–пт; в понедельник попадут и события выходных
DIGEST_CATCHUP_HOURS=3       # если сервис был выключен в 09:00 — отправит до 12:00
DIGEST_SEND_EMPTY=false      # в дни без событий ничего не отправлять

Time, days of the week, and text template are configured. The summary is sent once a day: the submission mark is stored on disk, so restarting the service will not trigger a rebroadcast. If one channel fails, only that channel repeats — the others will not receive the message a second time. The npm run digest command shows how the summary will look without sending anything.

Quick start#

Try it without AD — demo for 50 test employees with dates around today:

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

With connection to your AD:

cp .env.example .env    # LDAP_URL, LDAP_BIND_DN, LDAP_BIND_PASSWORD, LDAP_BASE_DN, BIRTHDAY_ATTRIBUTE, TIMEZONE
npm run check-ldap      # проверка подключения и заполненности дат
npm run digest          # предпросмотр утренней рассылки (ничего не отправляет)
npm start

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

The repository includes detailed step-by-step instructions: attribute selection and bulk date filling from Excel via PowerShell, personal data requirements, opt-out group, service account and LDAPS verification, installation on Windows Server, Linux, and Docker, HTTPS, setting up mailing (Exchange relay, Mattermost, Teams, Telegram), distributing links via GPO, troubleshooting, security checklist, general kernel settings, and a separate Windows sign-in document (Kerberos).

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

Lite: one script without a server#

Don't want to install a server? lite/birthdays.ps1 is a single Windows PowerShell 5.1 script with no settings or passwords. It reads the AD of the current domain and assembles one HTML file with upcoming birthdays and anniversaries — for example, for a shared drive. Node.js not needed, works on any computer in the domain.

.\lite\birthdays.ps1 -Demo
.\lite\birthdays.ps1 -OutFile \\fs01\Public\Дни-рождения.html -Install

With the -Install key, the script creates a scheduler task that updates the file every morning on behalf of the computer account — no password is needed. "Today" is counted in the browser, so even yesterday's file will show the correct day. The year of birth does not appear in the file.

Parameters (all optional): -BirthdayAttribute, -HireAttribute, -AnniversaryYears, -NoAnniversaries — birthdays only, -OptOutGroup — cancellation group, -Days — days ahead (default 30), -SearchBase — only the required OU, -Photos — embed photo, -At — update time, -Uninstall — delete task.

Date of birth is personal data#

Before launching, coordinate the service with the person responsible for personal data. The author recommends storing a date without a year (ДД.ММin AD): attributes extensionAttribute* can be read by any domain user by default. Allow employees to opt out of showing through the AD group. The HTML file of the Lite version also contains personal data — restrict access to the folder where it is placed.

Project status#

  • License — GPL-3.0, source code available upon request.
  • Covered by autotests — 45 tests (date and event calculation, kernel, server, interface language, Windows login) on Node.js 20 and 22 on Linux and Windows; with each push — integration run against the real Samba AD on the ad-testlab stand. Demo mode tested in the browser. Mailings were checked on fake (test) servers.
  • Working with Windows Server AD, Exchange, Teams, and Telegram has not yet been tested — so we are looking for administrators ready 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, npm run digest , or -Demo in Lite) and write in the comments what worked and what didn't.
  • 🇰🇿 Correct the Kazakh translation in public/i18n/kk.json.
  • 🛠️ Questions and access requests — through the Issues storefront; after gaining access, send issues and pull requests to the service repository.

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

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

Comments · 0

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