Fine-Grained Password Policy (FGPP) vs GPO: The Difference and Setup with PowerShell
The difference between GPO password policy and FGPP in Active Directory, why a GPO linked to an OU does not affect domain accounts, precedence, and creating an FGPP with PowerShell.
Active Directory has two ways to set password and lockout rules: Group Policy (GPO) and Fine-Grained Password Policy (FGPP). The most common mistake is trying to apply a different password policy with a GPO linked to an OU.
Password policy with GPO
The password policy for domain accounts comes only from a GPO linked at domain level (usually the Default Domain Policy). Only one such policy is in effect in the domain.
Linking a GPO with password settings to an OU does not affect the user accounts in that OU. What it affects is the local accounts of the computers in that OU. That is the answer to "I linked a policy to the OU but it does not work".
What FGPP is for
FGPP applies password and lockout rules that differ from the rest of the domain to specific users or groups. For example:
- at least 15 characters and stricter lockout for administrators,
- different age rules for service accounts.
FGPP properties:
- It applies to users and global security groups, not to OUs.
- If several FGPPs apply to a user, the one with the lowest precedence value wins.
- An FGPP linked directly to the user beats one that comes through a group.
- If no FGPP applies, the default domain policy is in effect.
Creating an FGPP with PowerShell
New-ADFineGrainedPasswordPolicy -Name "Admins" -Precedence 10 `
-MinPasswordLength 15 -ComplexityEnabled $true -PasswordHistoryCount 24 `
-MaxPasswordAge "180.00:00:00" -MinPasswordAge "1.00:00:00" `
-LockoutThreshold 5 -LockoutDuration "00:30:00" -LockoutObservationWindow "00:30:00" `
-ReversibleEncryptionEnabled $false
Add-ADFineGrainedPasswordPolicySubject -Identity "Admins" -Subjects "Domain Admins"
To see which policy applies to a user:
Get-ADUserResultantPasswordPolicy -Identity ahmet.yilmaz
To list all FGPPs:
Get-ADFineGrainedPasswordPolicy -Filter * | Select-Object Name, Precedence, MinPasswordLength, AppliesTo
How self-service portals should handle FGPP
A portal that shows password rules to users but reads only the default domain policy shows the wrong rules to a user under an FGPP: the user types a password that follows the displayed rules, and Active Directory rejects it.
PRESS writes the password to Active Directory and relies on the directory's decision: a password rejected by an FGPP is reported to the user as not meeting the password policy. The rules shown on screen are read from the domain's default policy.
Evaluate PRESS in your own environment.
Through the live demo you can explore the user portal and the admin panel directly.