ProfilePasswordPolicy defines password controls for users assigned to a particular Profile. It controls password length, character requirements, expiration, reuse, failed-login lockout, and password-reset link handling. Profile password policies override org-wide password policies for those users; they are exceptions to the organization baseline, not copies that automatically track changes to it.
The required profile element identifies the profile by name. The policy component has its own fullName, which is not the same identity as the referenced profile. To determine which users a policy affects, check their actual profile assignments.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The policy component's identity, inherited from Metadata. Do not substitute the referenced profile name when identifying a component to retrieve or remove. |
profile |
Required. The name of the Profile whose users receive the policy. |
passwordHistory |
Required. The number of previous passwords retained to prevent reuse. This value must be set before a password reset succeeds. If it is 0, passwordExpiration must also be 0. |
passwordExpiration |
Required. Days until passwords expire. Allowed values: 0, 30, 60, 90, 180, and 365. A value of 0 means passwords never expire. |
minimumPasswordLifetime |
When true, prevents a user from changing a password more than once in a 24-hour period. |
minimumPasswordLength |
Required. Minimum password length, from 5 to 50 characters. This is separate from character-composition requirements. |
passwordComplexity |
Required. Selects a character-composition rule from 0 through 4. These values are specific combinations, not a uniformly increasing set of requirements. |
maxLoginAttempts |
Required. The number of wrong-password attempts before lockout. Allowed values: 0, 3, 5, and 10. |
lockoutInterval |
Required. Login lockout duration in minutes. Allowed values: 0, 15, 30, and 60. Locked-out users must wait until the lockout period expires. |
forgotPasswordRedirect |
When true, a forgot-password email link stays active after its first click until the user confirms the reset request on an interstitial page. Default: false. |
Behavior and Constraints
Password history and expiration must agree. Setting passwordHistory to 0 requires passwordExpiration to be 0. The separate minimumPasswordLifetime setting controls how frequently a user can change a password; it does not set the expiration period.
passwordComplexity accepts these combinations:
-
0: Any character type. -
1: At least one alphabetic character and one number. -
2: At least one alphabetic character, one number, and one qualifying special character. -
3: At least one number, one uppercase letter, and one lowercase letter. -
4: At least one number, one uppercase letter, one lowercase letter, and one qualifying special character.
For values 2 and 4, the documented qualifying special characters are ! # $ % - _ = + < >. Changing from 2 to 3 replaces the special-character requirement with uppercase and lowercase requirements; it does not preserve every restriction of 2.
Read the lockout fields together. maxLoginAttempts supplies the failed-login threshold, while lockoutInterval supplies the duration. Both are required, so neither field alone describes the lockout policy.
forgotPasswordRedirect controls when a reset link is consumed. The interstitial page is an intermediate confirmation page before the password-reset request proceeds. This setting does not change password complexity or expiration.
Security-question settings are separate. The required passwordQuestion accepts 1 to prevent the password-hint answer from containing the password itself, or 0 for no such restriction. Setting obscure to true hides security-question answers as the user types.
Deployment and Retrieval
Components use the .profilePasswordPolicy suffix and reside in the profilePasswordPolicies folder. The type supports * as a member in a package.xml manifest for wildcard retrieval. See the ProfilePasswordPolicy reference.
A lower policy count than profile count does not necessarily mean retrieval is incomplete. A January 2022 community report states that profiles whose password policies have not been changed have no separate policy component and inherit the org-wide passwordPolicies configuration in SecuritySettings. Values displayed on a profile page can therefore be inherited values rather than a stored profile override.
To inspect the organization baseline, retrieve the Security member of Settings and inspect passwordPolicies in the returned SecuritySettings. Changing that baseline alone does not establish the settings applied to users whose profiles have overrides.
Wildcard retrieval support does not establish wildcard deletion behavior. An October 2022 CLI report describes a successful removal workflow: retrieve the policies first, then delete the retrieved components to return to the centralized policy. A type-only deletion had failed. The report included a component name such as PT2_profilePasswordPolicy12524392843, illustrating why the profile name alone might not identify the component to remove. This is a reported workflow, not a requirement to use the historical commands.
Case-only profile-name differences require care when mapping policies or moving them between orgs. Reports involving Admin, ADMIN, and the System Administrator profile describe ambiguous mapping and unexpected deployment changes. They do not establish that policy component names can always be freely replaced or that every policy must be deleted and recreated.
Relationships
The policy references its target profile through profile. The org-wide counterpart is SecuritySettings.passwordPolicies; that is an inheritance relationship, not a direct element reference from this component. See SecuritySettings for the organization-level configuration.
References
-
Profile:profile.
Reported Issues
-
Fewer retrieved policies can reflect inheritance rather than missing metadata. In January 2022, a response to a profile-count mismatch reported that unchanged profile password policies have no separate
ProfilePasswordPolicycomponent and instead use the org-wide settings. Profile-page values alone did not establish that an override existed. Retrieval count and inherited policies. -
A type-only deletion can fail even when policies exist. In October 2022, a CLI user reported
No ProfilePasswordPolicy named: * foundwhen attempting deletion by type. Retrieving the policies and then deleting the retrieved components reportedly removed the profile-specific policies. Retrieve-first removal workflow. -
Case-only profile names can make policy mapping ambiguous. A 2021 question reported lowercased
profilevalues in an org containing bothAdminandADMINprofiles, preventing the author from distinguishing the intended profile by that value alone. Profile-name mapping discussion. -
Renaming and deploying an admin policy reportedly changed an unintended policy and created a duplicate profile. A January 2025 reply described moving a retrieved admin policy between orgs after renaming it. The author reported changes to System Administrator password policies and creation of another profile named
Admin. This is a conditional deployment anomaly, not a general rename or delete-and-recreate procedure. Admin policy deployment report.
Common Questions
Why did ProfilePasswordPolicy retrieval return fewer components than profiles?
Profiles can inherit the org-wide password policy without having a separate component. A January 2022 report identified this as the reason for a count mismatch. Check SecuritySettings.passwordPolicies as well as the retrieved profile overrides.
How do I remove profile password policies and use the org-wide policy?
A reported successful workflow retrieved the policy components first and then deleted those retrieved components. Use their component identities rather than assuming the profile names identify them. Wildcard retrieval support does not establish wildcard deletion behavior.
Is the policy fullName the same as the profile name?
No. fullName identifies the policy component; profile names the profile it targets. Retrieved component names can include a generated suffix.
Can passwordHistory be 0 while passwords still expire?
No. When passwordHistory is 0, passwordExpiration must also be 0, which means passwords never expire.
Does passwordComplexity 3 include every requirement of 2?
No. Value 2 requires an alphabetic character, a number, and a qualifying special character. Value 3 requires a number, an uppercase letter, and a lowercase letter, but does not retain the special-character requirement. Value 4 adds that requirement to the combination used by 3.