how to provision a service account in active directory
Provisions a least-privilege Active Directory service account for applications and scripts. Covers naming, password policy, group membership, and documentation. Use when an app or automation needs its own AD identity. Not for human user accounts.
TL;DR
Create the account in a dedicated Service Accounts OU with a descriptive name, set a long random password that never expires (or better, a managed service account), grant only the permissions the app needs, document the owner and purpose, and add it to the password-rotation schedule.
The error
(New service needed; no error. Proactive provisioning request.)Steps
- Create the account in the designated Service Accounts OU, not the Users OU. Expected: account created with "User cannot change password" and "Password never expires" per your service-account policy, or use a group Managed Service Account (gMSA) instead.
- Set a 32+ character random password and store it in the privileged vault. Expected: vault entry created. Never email the password.
- Add the account only to the groups the application requires. Expected: minimal membership. Start with nothing and add per the app's documented needs.
- Set delegation carefully: if the app needs Kerberos delegation, constrain it to the specific services. Expected: constrained delegation configured. Unconstrained delegation on service accounts is a classic attack path.
- Document in the ticket/CMDB: owner, purpose, app, expiry/review date. Expected: record complete. Every service account needs an owner or it becomes permanent mystery access.
When to use
- New application, script, or integration needs AD authentication
- Replacing a shared human account used by a service
When not to use
- Human access (provision a user account instead)
- Cloud-only workloads (use a managed identity in Entra ID)
Compatibility
- Windows Server Active Directory; gMSA needs 2012+ forest functional level
Variants
App supports gMSA
Prefer it: the password is managed by AD automatically and never known to humans.
Vendor insists on domain admin for the service account
Push back. Grant the specific rights the app needs; domain admin service accounts are how breaches spread.
Why it happens
Services need identities to authenticate, but human-account practices (expiring passwords, interactive logon) break automation. Service accounts exist to give automation a stable, least-privilege identity.
Edge cases
- Service accounts are prime Kerberoasting targets: use long passwords and monitor for unusual ticket requests.
- Review service accounts quarterly; orphaned ones from dead projects are common.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstjzoh7YHV8Lm1tW5KLNijQ
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.