ADSelfService is an open-source intranet solution for Active Directory.
This repository combines a .NET 8 API and a PHP web client designed to work together, with clear separation between AD logic, access security, and intranet UI.
The two main components are:
ADSelfService-API.Server: .NET 8 API for authentication, LDAP/AD operations, and server-side security enforcement.WEB-CLIENT-PHP: PHP intranet portal for user workflows, admin operations, i18n, and web-facing flows.
ADSelfService-API/
|- ADSelfService-API.Server/ .NET 8 API
|- WEB-CLIENT-PHP/ PHP intranet client
|- CONFIG-OPTIONS.md API config reference (FR)
|- CONFIG-OPTIONS.en.md API config reference (EN)
|- README.md FR overview
`- README.en.md EN overview
- AD authentication (
POST /auth). - User profile view and update.
- User password change.
- Dedicated forgot-password reset flow.
- AD account administration: create, update, delete, enable, disable, unlock, rename, move, set expiration.
- Group and membership administration.
- OU administration (create, update, delete).
- AD explorer and object search.
- Tool access filtered by user permissions.
ADSelfService is especially well suited for:
- homelabs and test environments
- small to medium organizations
- IT teams that want a simple, readable, self-hosted base
The project can also be used in production when standard hardening is applied:
- proper TLS between web client and API
- protected LDAP transport (
LDAPSorKerberos sealing) - strong internal shared secret (
InternalSharedSecret) - strict IP filtering (
AllowedIps) - least-privilege AD service account
- backups, monitoring, and update process
Current code behavior enforces:
- request filtering through
Security.AllowedIps - required and strong internal shared key:
Security.InternalSharedSecret - required application context header on sensitive routes:
X-App-Context - protected LDAP transport is mandatory:
Ldap.Ssl=true(LDAPS), orLdap.UseKerberosSealing=true(LDAP + Kerberos sealing)
Debug.ShowPasswords=trueis forbidden
If these constraints are not met, the API may refuse startup or reject requests.
- Standard user: profile, password, allowed tools.
- User admin: account and membership operations.
- Domain admin: advanced actions (OU, groups, AD explorer).
The PHP client filters UI actions by role, and the API also enforces authorization server-side.
- Download archives from GitHub Releases.
- Deploy
ADSelfService-API-Server.zipon the API host. - Run
ADSelfService-API.Server.exeonce to generateconfig.json. - Complete
config.json(LDAP, security, server binding). - Restart and verify
GET /health. - Deploy
ADSelfService-WEBSERVER-Files.zipon the web host. - Create
WEB-CLIENT-PHP/config-intranet.phpfromconfig-intranet-default.php. - Verify consistency between
API_BASEandINTERNAL_SHARED_SECRET.
git clone <repo-url>
cd ADSelfService-API
copy config.example.json config.json
cd ADSelfService-API.Server
dotnet run- ADSelfService-API.Server/README.en.md
- CONFIG-OPTIONS.en.md
- ADSelfService-API.Server/LDAP-CONFIG.en.md
- ADSelfService-API.Server/ENDPOINTS.en.md
- ADSelfService-API.Server/CHANGELOG.en.md
- WEB-CLIENT-PHP/README.en.md
WEB-CLIENT-PHP/config-intranet-default.phpWEB-CLIENT-PHP/intranet-i18n.phpWEB-CLIENT-PHP/forgot_password.php
GET /healthreturns200.- User login works.
- Password change works.
- Forgot-password flow works.
- Tools are correctly permission-filtered.
- Admin actions are visible and effective for the right role.
- AD search behavior matches
BaseDn,GroupBaseDn, andRootDn.
| Issue | First check |
|---|---|
403 on API calls |
AllowedIps, InternalSharedSecret, X-App-Context |
| API fails at startup | invalid/incomplete config.json, unmet security requirement |
| LDAP bind failure | Ldap.Url, Port, BindDn, BindPassword, DNS/network |
| Password change rejected | verify LDAPS or Kerberos sealing |
| PHP client blocked at startup | config-intranet.php, API_BASE, shared secret |