# How do Password Policies configure organizational compliance for user credential strength and expiration?

**Topic:** Admin · **Difficulty:** Medium · **Tags:** Admin, Password Policies, Credential Security

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-password-policies-configure-organizational-compliance-for-user-credential-strength-and-expiration

## Answer

**Basics:** Weak, reused or never-changed passwords are a main source of account compromise. Salesforce lets admins define how strong passwords must be and what happens after repeated failures. Users logging in via SSO (delegated authentication or SAML) are governed by the identity provider instead, unless the org uses Salesforce login as well.

**How it works:**
- User passwords expire in: 30, 60, 90, 180, 365 days or Never expires.
- Enforce password history: remember 1 to 24 previous passwords, or none.
- Minimum password length: from 5 to 20 characters (default 8).
- Password complexity: no restriction, or require alphanumeric, alphanumeric plus special characters, or uppercase/lowercase/number (with special characters optional).
- Password question requirement: the hint cannot contain the password.
- Maximum invalid login attempts: 3, 5, 10 or no limit.
- Lockout effective period: 15, 30, 60 minutes or until an administrator unlocks.
- Option to require a minimum one-day password lifetime and to obscure the secret answer.
- Profile Password Policies override these for specific profiles (for example, stricter for System Administrators).

**Advanced / deep dive:** Modern strategy is MFA first, passwords second: Salesforce requires MFA for direct logins to its products under its contractual terms, and Passwordless Login (via authenticators or passkeys) removes passwords for users who adopt it. Locked-out users are unlocked in Setup > Users, or the user resets. API integration users typically authenticate with OAuth (JWT bearer or client credentials) instead of passwords plus security tokens, which makes password expiry a non-issue; integration users with "Password never expires" are an exception that should be reviewed. Experience Cloud sites have their own self-registration and password policies controlled through the network settings and Login handler. Monitor with Login History and Event Monitoring.

**Code / config example:**
```
Setup > Security > Password Policies
  User passwords expire in: 90 days
  Enforce password history: 5 passwords remembered
  Minimum password length: 12
  Password complexity requirement: Must include numbers, uppercase and lowercase letters, special characters
  Maximum invalid login attempts: 5
  Lockout effective period: 30 minutes
Setup > Profiles > [Admin Profile] > Password Policies: stricter overrides
```

**Hidden gotchas & must-remember points:**
- Policy changes affect next password change, not existing passwords, until they expire or are reset.
- Profile-level policies override org-wide ones.
- SSO users are not governed by Salesforce password policies.
- A short lockout period with high attempt counts still permits slow brute-force; pair with IP restrictions and MFA.
- Expiry resets integration users who still use passwords, causing outages.
- Security token is separate from password and resets whenever the password changes.

**Best practice:** Prefer MFA and SSO, use long minimum lengths, and exempt no human users from policy.

---
Source: ForceChallenges · last updated 2026-11-02
