Microsoft Entra Password Protection: Custom Banned Passwords and On-Premises AD
Microsoft Entra ID already checks every cloud password change or reset against a global banned password list built from its own security telemetry. You can't edit or disable that list (Global banned password list (opens in a new tab)). What you can do is add a custom list of terms specific to your organization, and push the same checks to on-premises Active Directory so hybrid users can't set a weak password at the domain controller.
Use it when: users keep choosing passwords built from your company name, product names or city, or you're closing the gap where on-premises password changes skip the cloud checks. Microsoft's own advice is not to rely on strong passwords alone, so pair this with MFA (Password Protection overview (opens in a new tab)).
Before you start
-
License (License requirements (opens in a new tab)):
Users Global list Custom list Cloud-only Microsoft Entra ID Free Microsoft Entra ID P1 or P2 Synced from on-premises AD DS Microsoft Entra ID P1 or P2 Microsoft Entra ID P1 or P2 -
Roles: the custom list tutorial uses at least Authentication Policy Administrator (Tutorial prerequisites (opens in a new tab)). The on-premises enablement article uses at least Authentication Administrator (Enable on-premises (opens in a new tab)). The first proxy registration in a tenant needs Global Administrator; later proxy and forest registrations can use Security Administrator (Proxy requirements (opens in a new tab)).
- On-premises servers: DC agent and proxy machines must run Windows Server 2012 R2 or later with .NET 4.7.2 (Deployment requirements (opens in a new tab)).
Part 1: Custom banned password list (cloud)
- Sign in to the Microsoft Entra admin center and go to Entra ID > Authentication methods > Password protection (Configure custom banned passwords (opens in a new tab)).
- Set Enforce custom list to Yes.
- Add terms, one per line. Good candidates are brand and product names, locations such as headquarters, internal terms and abbreviations, and months and weekdays in your local languages (What are banned password lists (opens in a new tab)). Limits: up to 1,000 terms, each 4 to 16 characters; matching is case-insensitive and handles common substitutions such as "o"/"0" and "a"/"@".
- Select Save. Updates can take several hours to apply.
- Test with a non-admin account: My Apps > Profile > Change password, and try a variation of a banned term. You should get the "blocked by your administrator" message (Test (opens in a new tab)).
Don't paste a breached-password dump into the custom list. It's capped at 1,000 terms and isn't designed for large lists; the evaluation already uses fuzzy matching and substring matching on base terms (How are passwords evaluated (opens in a new tab)).
Part 2: Extend it to on-premises Active Directory
- Download both installers (proxy and DC agent) from the Microsoft Download Center link on the concept page (Download (opens in a new tab)).
- Install the proxy service on at least one domain-joined server (not necessarily a DC). The proxy is mandatory even if DCs have direct internet access. The proxy install doesn't need a reboot (Install the proxy (opens in a new tab)).
- Register the proxy, then the forest, with
Register-AzureADPasswordProtectionProxyandRegister-AzureADPasswordProtectionForest(Microsoft's cmdlet names), then runTest-AzureADPasswordProtectionProxyHealth -TestAll. Forest registration is needed once in the life of the forest. - Install the DC agent (
AzureADPasswordProtectionDCAgentSetup.msi) on domain controllers. Installing or uninstalling the DC agent requires a restart, because password filter DLLs only load or unload at boot. Plan DC reboots (Install the DC agent (opens in a new tab)). - Turn it on in audit mode. In Entra ID > Authentication methods > Password protection, set Enable password protection on Windows Server Active Directory to Yes and Mode to Audit, then Save (Enable on-premises (opens in a new tab)). In audit mode, passwords that would be rejected are still accepted but logged.
- Watch the DC event logs for a while, including at least one DC promotion and one demotion, which Microsoft recommends testing during audit (Deployment strategy (opens in a new tab)).
- Switch Mode to Enforced. Rejected users see their normal on-premises "does not meet the length, complexity, or history requirements" message, not a Microsoft Entra-specific one (Enforced mode (opens in a new tab)). Warn the help desk.
Read-only PowerShell: current tenant password rule settings
Read-only. Module: Microsoft.Graph.Groups. Scope: GroupSettings.Read.All. Directory Readers or Global Reader can read setting objects (List settings (opens in a new tab)). Not tested against a live tenant.
Connect-MgGraph -Scopes "GroupSettings.Read.All"
$rules = Get-MgGroupSetting -All | Where-Object DisplayName -eq "Password Rule Settings"
if (-not $rules) {
"No 'Password Rule Settings' object exists, so tenant defaults apply."
} else {
$rules.Values | Select-Object Name, Value |
Export-Csv .\password-rule-settings.csv -NoTypeInformation
}
Get-MgGroupSetting without -GroupId lists tenant-level settings (Get-MgGroupSetting (opens in a new tab)), and "Password Rule Settings" is a tenant setting template (Groups settings cmdlets (opens in a new tab)). A settings object only exists after someone changes the defaults (groupSetting (opens in a new tab)). The individual value names aren't documented on those pages, so the script exports whatever name/value pairs are present instead of hard-coding them. The admin center page remains the authoritative view.
Gotchas
- Partial DC deployment isn't secure. Only DCs with the agent check passwords, and you can't control which DC a client uses, so install on every DC in the domain (Incremental deployment (opens in a new tab)).
- No policy downloaded means no check. If a DC has no locally available policy, passwords are accepted and an event is logged (Key considerations (opens in a new tab)).
- It supplements AD password policy. Existing complexity rules and any third-party password filters still apply; all must agree (How it works (opens in a new tab)).
- One tenant per forest. The forest and all its proxies must register to the same tenant (Forest / tenant binding (opens in a new tab)).
- Proxy registration adds credentials to the AADPasswordProtectionProxy service principal; expect that in the audit logs.
- Device code sign-in: one registration mode uses
-AuthenticateUsingDeviceCode. If you've blocked device code flow, use the interactive mode. - Learn names two different minimum roles (Authentication Policy Administrator in the tutorial, Authentication Administrator in the on-premises enablement article). Both are listed above; neither page is marked as superseding the other.
Check it worked
- Cloud: the test user's banned-term password is rejected.
- On-premises: in audit mode, DC agent event logs record passwords that would be rejected; in enforced mode, a weak password change at a DC fails.
Roll back
Set Enforce custom list to No, or set Enable password protection on Windows Server Active Directory to No. With the second setting off, DC agents go quiet, accept all passwords and stop logging (Enable on-premises (opens in a new tab)). Uninstalling the DC agent needs another DC restart; the proxy can be removed through Add or remove programs.
Related on EntraReady: SSPR with password writeback, Phishing-resistant MFA, Entra Connect and Cloud Sync health check, Unlock a user locked out by smart lockout.
← All GuidesIs this still accurate?
Spotted something outdated or wrong on this page? Tell us in a sentence. The page address is sent with it.