Entra Password Protection on-premisesEntra Password Protection on-premises

Active Directory’s built-in password policy checks length and complexity, and nothing else. Summer2026! passes. So does your company name with a capital letter and a number on the end. These are exactly the passwords that password spray attacks try first.

Microsoft Entra Password Protection deals with them. It brings the same banned password checks Entra ID uses in the cloud to your on-premises domain controllers, so weak passwords are rejected when users change them on a domain-joined PC, not just when they reset them online.

I’ve deployed it in our hybrid environment and it’s running in Audit mode while I work out what Enforced will actually break. This post covers the deployment and the parts the Microsoft documentation spreads across five different pages. It also covers how to read Audit mode properly, including one reporting quirk that makes the numbers look worse than they are, and what to check before you flip it to Enforced.

How it works

There are two pieces of software.

The proxy service runs on a domain-joined member server. It’s the only part that talks to Entra ID, and it fetches your tenant’s password policy (Microsoft’s global banned list plus your custom list) on behalf of the domain controllers.

The DC agent runs on every writable domain controller. It includes a password filter that Windows calls on every password change and reset. The agent checks the new password against the policy, which it caches locally and refreshes about once an hour through the proxy.

The domain controllers never need internet access. And because the policy is cached, Microsoft’s deployment guide notes that DC agents keep enforcing their last known policy even if every proxy goes offline.

What it checks, and why a long password still passes

It doesn’t just compare passwords against a list. Microsoft’s explanation of how passwords are evaluated describes three stages. The password is normalised first, so it’s lowercased and common substitutions like @ for a and 0 for o are reversed. It’s then checked for banned terms, including near misses one character away. Finally it’s scored. Each banned term found is worth one point, every other character is worth one point, and the password needs at least five points to pass.

Take P@ssw0rd1. It normalises to password1. The word password is one point and the 1 is another, so it scores two and fails. A long passphrase that happens to contain one banned word sails through, because every other character adds a point. That’s deliberate. The aim is to stop predictable passwords, not to force everyone into gibberish.

The custom banned list is where you add what Microsoft can’t know about you: your company name, product names, local sports teams, the suburb your office is in. Put the root words in, not variations. Normalisation and fuzzy matching handle C0mpany2026 for you.

Licensing

For users synced from on-premises AD, both the global and custom banned lists need Entra ID P1 or P2, according to the licensing table in Microsoft’s documentation. Most organisations on Microsoft 365 E3, E5 or Business Premium already have P1, but check before you plan around it.

Installing the proxy

The proxy goes on a member server, not a domain controller. Two is sensible for redundancy, and the DC agents spread their requests across every proxy they find. We put ours on an existing infrastructure server rather than building a new one. The one thing to avoid is a server running the Entra application proxy connector. Microsoft’s FAQ warns that the two install incompatible versions of the same updater service.

Download both installers from Microsoft, install the proxy, then register it and the forest from an elevated PowerShell session on the proxy server:

Import-Module AzureADPasswordProtection

Register-AzureADPasswordProtectionProxy -AccountUpn "admin@contoso.com" -AuthenticateUsingDeviceCode
Register-AzureADPasswordProtectionForest -AccountUpn "admin@contoso.com" -AuthenticateUsingDeviceCode

-AuthenticateUsingDeviceCode saves a lot of grief if the server’s browser can’t complete an MFA prompt. The forest registration also needs Domain Admin rights in the forest root domain, so run it as an account that has them.

Both registrations are one-off. Then check the proxy can reach Entra ID:

Test-AzureADPasswordProtectionProxyHealth -TestAll

Installing the DC agent

Install the agent on every writable domain controller. Read-only DCs don’t need it. It requires .NET Framework 4.7.2 and a reboot, because Windows only loads password filters at startup, so schedule DCs one at a time in a maintenance window.

Skipping one is easy to do and hard to spot. A password change handled by a domain controller without the agent isn’t checked at all. Users won’t notice, but your protection will have holes in it that depend on which DC their PC happened to talk to.

Once the DCs are back, this compares the agents that have checked in against the writable DCs in the domain. It needs the Active Directory PowerShell module on the proxy server:

$dcs    = Get-ADDomainController -Filter * | Where-Object { -not $_.IsReadOnly } | Select-Object -ExpandProperty HostName
$agents = Get-AzureADPasswordProtectionDCAgent | Select-Object -ExpandProperty ServerFQDN

$dcs | Where-Object { $_ -notin $agents }

No output means every writable DC has a working agent. The same cmdlet shows a heartbeat time for each agent. A heartbeat that stops updating means that DC’s agent has stopped or been removed.

Turning it on in Audit mode

In the Entra admin centre, go to Protection, then Authentication methods, then Password protection. Turn on password protection for Windows Server Active Directory, set the mode to Audit, and add your custom banned terms.

The policy reaches the domain controllers within about an hour. You can confirm it in the DC agent’s Admin event log on any DC, under Applications and Services Logs, Microsoft, AzureADPasswordProtection, DCAgent. Look for event 30006, which shows the policy being applied with AuditOnly: 1.

Watch for event 30001 as well. It means a password was accepted because the DC had no policy to check against, usually because the forest isn’t registered or the DC can’t reach a proxy. In Enforced mode that would be a silent failure, so it’s worth catching now.

Reading Audit mode properly

Audit mode lets every password through but logs the ones that would have been rejected. That log is the whole point of running it, so it’s worth understanding what’s in it.

The events that matter, from Microsoft’s monitoring guide:

OutcomeChange (user)Set (admin reset)
Passed1001410015
Would have failed (Audit mode)1002410025
Would have failed on user name (Audit mode)10016 + 3002410017 + 30023
Rejected (Enforced mode)1001610017

A change is a user choosing their own new password. A set is someone else setting it for them: a service desk reset, an onboarding script or a provisioning tool.

The quickest overview is the summary report, run on the proxy server. It reads the event logs on every DC over PowerShell remoting, so it can be slow in a large environment:

Get-AzureADPasswordProtectionSummaryReport

Now look at the third row of the table. When a password would have failed only because it contains the user’s own name, Audit mode logs it as 10016 or 10017, the same IDs used for a real rejection. The summary report counts those IDs as rejections. So in Audit mode, PasswordChangesRejected can be above zero even though nothing was rejected. Those are audit hits, and you can confirm it by the matching 30024 or 30023 event.

Finding out who would be affected

Counts tell you how big the problem is. To fix it, you need names. This pulls every would-have-failed event from the last 30 days across all writable DCs:

$since = (Get-Date).AddDays(-30)

$results = foreach ($dc in $dcs) {
    Get-WinEvent -ComputerName $dc -ErrorAction SilentlyContinue -FilterHashtable @{
        LogName   = "Microsoft-AzureADPasswordProtection-DCAgent/Admin"
        Id        = 10024, 10025, 10016, 10017
        StartTime = $since
    } | Select-Object TimeCreated, Id,
        @{ n = "DC";   e = { $dc } },
        @{ n = "Type"; e = { if ($_.Id -in 10024, 10016) { "Change" } else { "Set" } } },
        @{ n = "User"; e = { if ($_.Message -match "UserName:\s*(\S+)") { $Matches[1] } } }
}

$results | Group-Object Type, User | Sort-Object Count -Descending |
    Select-Object Count, Name

If Get-WinEvent reports that the log doesn’t exist, run Get-WinEvent -ListLog *PasswordProtection* on a DC to confirm the exact log name for your agent version.

Two patterns are worth looking for in the output.

Sets matter more than changes. A user who picks a weak password will get an error in Enforced mode, try again and move on. A tool that sets weak passwords will start failing outright. If the same account or the same few accounts keep appearing as Set, find out what’s setting those passwords. Onboarding scripts that generate something like Welcome plus the year are the classic case, and service desk staff often have a favourite temporary password too. Fix those before you enforce, or new starters won’t get accounts.

Repeat offenders need a conversation, not a block. If the same people show up again and again, they’re the ones who’ll ring the service desk on day one of Enforced mode. A short note telling them what’s changing will save everyone time.

Deciding when to enforce

There’s no magic number of days. I’d want to see a full password expiry cycle, or at least a month, so most users have changed their password once while you’re watching. Before switching, you should be able to say yes to all of these:

  • Every writable DC has an agent with a current heartbeat.
  • No 30001 events (no policy available) on any DC.
  • Every account generating Set events has been traced to a person or a tool, and the tools are fixed.
  • The service desk knows the change is coming and has a new process for temporary passwords.
  • Users have been told, in plain words, what kinds of passwords will stop working.

The user briefing is the step most people skip. When Enforced mode rejects a password on a Windows PC, the user sees the standard “doesn’t meet the password policy requirements” message. It doesn’t say the password contained a banned word. Without some warning, people assume they got the complexity rules wrong and try the same base word with a different number on the end, which fails again.

Switching to Enforced is the same setting in the Entra admin centre, and it reaches the DCs within the hour. It only applies to new password changes and resets. Existing weak passwords stay valid until the next time each user changes theirs, so pair it with your normal expiry policy or a targeted reset if you need weak passwords gone sooner.

Leave a Reply

Your email address will not be published. Required fields are marked *