In plain words
A business hands out badges: each employee has one, which opens the doors they need, and not the others. On the day they change department, their access changes; on the day they leave, their badge is deactivated that same evening. Identity management is exactly that, applied to IT accounts. The most serious attacks almost never go through a sophisticated technical flaw: they go through an account that's too powerful, forgotten or poorly protected.
This guide applies to Active Directory, Entra ID and any directory. For how AD and Entra ID fit together, see hybrid identity.
1. The concepts
| Term | Meaning |
|---|---|
| Identity | A person, an application or a machine known to the directory |
| Authentication | Proving who you are (password, security key, biometrics) |
| Authorisation | What you're allowed to do once authenticated |
| IAM (Identity and Access Management) | The whole thing: directories, authentication, rights |
| IGA (Identity Governance and Administration) | Steering it: lifecycle, access requests, reviews, compliance |
| PAM (Privileged Access Management) | The specific protection of administration accounts |
| Least privilege | Everyone gets only the rights needed for their task, for as long as needed |
Three kinds of identity
| Type | Examples | Main risk |
|---|---|---|
| Human | Employees, contractors, guests | Phishing, reused passwords, forgotten leavers' accounts |
| Service accounts | An application's account, a backup's, a scheduled task's | A password that never expires, excessive rights, nobody responsible for it |
| Machines and applications | Domain computers, managed identities, applications registered in Entra ID | Secrets left in scripts, certificates not renewed |
2. The lifecycle: joining, moving, leaving
This is the heart of the matter. It's often called the JML process (Joiner, Mover, Leaver).
| Stage | What to do | Classic mistake |
|---|---|---|
| Joining | Create the account from an approved request (ideally from the HR software), add it to its role groups, two-factor authentication from day one | Copying a colleague's rights, with their whole history |
| Moving | Remove the old access, then add the new | Adding without removing: over the years, the account accumulates everything |
| Long absence | Disable temporarily if the policy says so | Account active but unused for months |
| Leaving | Disable the same day, revoke sessions and tokens, recover devices, transfer data, delete after the set period | Account left active "just in case", shared mailbox forever |
The leaving procedure
- Disable the account (don't delete it straight away: you'd lose the history and the rights on files).
- Reset its password and revoke the current sessions (in Entra ID: Revoke sessions), so that tokens already issued stop working.
- Remove the account from groups, licences, applications and roles.
- Recover the devices and remotely wipe company data from phones (MDM).
- Transfer the mailbox and files to the manager, according to company policy.
- Check access outside the directory: local application accounts, supplier access, VPN, SaaS tools bought outside the IT department.
- Delete the account after the defined retention period (30 to 90 days depending on the organisation).
One source of truth
The best trigger for these steps is the HR software: when a departure is entered there, the account is disabled automatically. Entra ID offers lifecycle workflows and provisioning from the main HR software; on the open source side, IGA tools such as midPoint play this role.
3. Least privilege and roles
Never give rights directly to a person: give them to a group that represents a role, and put people in that group. When someone changes job, you change their groups; when a right needs to change, you change it once, for the whole role.
In Active Directory, the classic model is AGDLP:
| Letter | Meaning | Example |
|---|---|---|
| A (Accounts) | User accounts… | spo |
| G (Global groups) | …are placed in global groups by role… | GG_Accounting |
| DL (Domain Local groups) | …which are members of domain local groups by resource and access level… | DL_Share_Accounting_Modify |
| P (Permissions) | …which carry the permissions on the resource | Modify right on \\SRV-FS01\Accounting |
Result: reading a user's groups tells you what they do; reading a resource's groups tells you who can access it.
4. Privileged accounts
Separate the everyday account from the administration account
| Account | Use | Example |
|---|---|---|
| Standard account | Email, browsing, office work | spo |
| Administration account | Administration only: no email, no web browsing | adm-spo |
| Domain administration account (if needed) | Domain controllers only | t0-spo |
An administrator who reads email with their domain admin account hands the keys to the whole company to a single booby-trapped email.
The tier model
Microsoft and ANSSI (the French national cybersecurity agency) recommend splitting administration into tiers: an account from one tier never signs in to a machine in a less protected tier, so its credentials can't be stolen there.
| Tier | Contains | Administered from |
|---|---|---|
| Tier 0 | What controls identity: domain controllers, AD CS (certificate authority), the Entra Connect server, AD FS, and everything that can administer them (backups, the domain controllers' hypervisors) | Dedicated administration workstations (PAW) |
| Tier 1 | The business's servers and applications: files, databases, line-of-business applications | Dedicated workstations or jump servers |
| Tier 2 | Users' workstations and devices | Support tools, dedicated support accounts |
The Tier 0 traps
Anything that can act on a domain controller is Tier 0: the hypervisor hosting it, the backup console that restores it, the deployment tool that pushes software to it, the synchronisation server to Entra ID. An antivirus or monitoring tool administered from an ordinary workstation and installed on the domain controllers is a direct attack path.
Other measures for administrators
| Measure | What it brings |
|---|---|
| Privileged groups almost empty (Domain Admins, Enterprise Admins) | Fewer accounts to protect; Microsoft recommends fewer than 5 Global Administrators in Entra ID |
| Protected Users group for AD administration accounts | Disables old authentication mechanisms (NTLM, weak encryption, delegation) for these accounts |
| Windows LAPS | A different local administrator password on every computer and server, changed automatically: a stolen password no longer opens the whole fleet |
| Just-in-time access (PIM in Entra ID, Entra ID P2 or governance licence) | Roles are eligible, not permanent: you activate them for a few hours, with a justification, two-factor authentication and possibly approval |
| Privileged access workstations (PAW) | Administration credentials never pass through a computer exposed to the internet |
| Phishing-resistant two-factor authentication | FIDO2 keys or Windows Hello for Business for every administrator (see two-factor authentication, passkeys and FIDO2 keys) |
Emergency (break glass) accounts
Plan two emergency accounts in Entra ID, cloud-only (never synchronised), with the Global Administrator role, for the day nobody can sign in any more (two-factor authentication outage, mistake in conditional access, administrator account locked):
- authentication with a FIDO2 key (kept in a safe) or a very long password held in escrow;
- excluded from conditional access policies that could block them, but monitored: every sign-in must trigger an alert;
- tested regularly, with their usage procedure documented.
5. Service accounts
| Good practice | How |
|---|---|
| Managed service accounts in AD | gMSA (group Managed Service Account): the password is generated and changed automatically by AD, nobody knows it |
| Managed identities in Azure | An Azure application authenticates with no stored secret |
| One account per service, with a named owner | Know what it's for and who decides when to delete it |
| Minimal rights, never Domain Admins | A backup account doesn't need to be an administrator of everything |
| No interactive logon | Restrict through group policy (Deny log on locally, Deny log on through Remote Desktop Services) |
| Secrets in a vault (Azure Key Vault, HashiCorp Vault, Bitwarden Secrets Manager…) | No plain-text password in a script or a configuration |
Create a gMSA (in PowerShell with the Active Directory module, on a forest where the KDS root key exists):
New-ADServiceAccount -Name gmsa-backup `
-DNSHostName gmsa-backup.company.local `
-PrincipalsAllowedToRetrieveManagedPassword "GG_Backup_Servers"
6. Password policy
The recommendations have changed. The US standard NIST SP 800-63B (revision 4, 2025), widely adopted, now requires:
| Rule | Current recommendation |
|---|---|
| Length | At least 15 characters for a password used alone, at least 8 if combined with a second factor |
| Composition rules (mandatory uppercase, digit, special character) | No longer to be imposed: they produce predictable passwords (Hello2026!) |
| Mandatory periodic change | No longer to be imposed; forced change only after a compromise |
| List of banned passwords | Mandatory: reject common, expected or already leaked passwords |
| Maximum length | Accept at least 64 characters, and passphrases |
In Entra ID, password protection blocks weak passwords and a custom list (company name, town); an agent extends it to on-premises Active Directory. The best password is still the one you don't have to remember: a password manager (see the dedicated guide) and, eventually, passwordless passkeys.
7. Access reviews, logging and auditing
Access reviews
At least once a quarter for sensitive access, once a year for the rest: each owner confirms that the members of their groups and the accounts in their application still need them. Entra ID automates these reviews (governance licence); otherwise, an export and a signed spreadsheet are enough to start.
Check at every review:
- accounts inactive for more than 90 days;
- accounts whose password never expires;
- members of privileged groups;
- guests and contractors whose assignment has ended.
List accounts inactive for 90 days in AD:
Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |
Select-Object Name, SamAccountName, LastLogonDate
Events to monitor
| Windows event (domain controllers) | Meaning |
|---|---|
| 4728, 4732, 4756 | A member was added to a security group (global, local, universal): alert on privileged groups |
| 4720 | A user account was created |
| 4625 | Failed logon (in large numbers: a brute-force attack) |
| 4740 | An account was locked out |
Centralise these logs (SIEM, or a collection tool such as Wazuh or Graylog) and alert on changes to privileged groups.
Auditing your Active Directory
| Tool | Publisher | What it does |
|---|---|---|
| ORADAD | ANSSI (France) | Collects AD data to analyse its security, against ANSSI's control points |
| PingCastle | Netwrix | AD security report with a score and prioritised recommendations; free to use for auditing your own network |
| BloodHound (community edition) | SpecterOps | Maps the attack paths to privileged accounts: very persuasive |
| Purple Knight | Semperis | Free assessment of AD and Entra ID exposure |
Run these tools with written approval from management: attackers use them too.
8. Checklist
| Item | Done? |
|---|---|
| Joining, moving and leaving procedure written down, and triggered by HR | ☐ |
| Leavers' accounts disabled the same day | ☐ |
| Rights assigned through role groups, never directly | ☐ |
| Administration accounts separate from everyday accounts | ☐ |
| Privileged groups reduced to the strict minimum | ☐ |
| Windows LAPS deployed on every computer and server | ☐ |
| Two cloud emergency accounts, monitored | ☐ |
| Service accounts listed, with an owner, as gMSA where possible | ☐ |
| Password policy: length, banned list, no forced periodic change | ☐ |
| Two-factor authentication for everyone, phishing-resistant for administrators | ☐ |
| Access reviews scheduled | ☐ |
| Alerts on changes to privileged groups | ☐ |
| AD audit (PingCastle or ORADAD) at least once a year | ☐ |
Key points
- Joining, moving, leaving: departures are handled the same day, and moves start by removing the old rights.
- Least privilege: rights through role groups, never directly.
- Separate administration accounts, the tier model, LAPS, just-in-time access, and two monitored emergency accounts.
- Service accounts: gMSA or managed identities, an owner, minimal rights, secrets in a vault.
- Long passwords, a banned list, no forced periodic change; regular access reviews and an AD audit.
Sources
- Microsoft: the tier model for Active Directory
- Microsoft: Privileged Identity Management (PIM)
- Microsoft: security benchmark, privileged access
- NIST SP 800-63B-4: authentication requirements
- ANSSI (France): recommendations for the secure administration of information systems (in French)
- ANSSI (France): ORADAD, data collection tool for Active Directory audits