---
schema_version: "1"
id: 9871ccb47fb7efe97515b530d08c978545305c16748310c030a0c1d1d76c7126
title: ProfilePasswordPolicy
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_profilepasswordpolicy.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profilepasswordpolicy.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8db3492179b5cfbd86d4d76ebbb7e82881b2cd6450e0da1ed642186c71c6fde3
description: Represents a profile’s password policies. Profile password policies override org-wide password policies for that profile’s users. Use ProfilePasswordPolicy to retrieve password policies for a given profile. This type extends the Metadata metadata type and inherits its fullName field.
---
# ProfilePasswordPolicy

Represents a profile’s password policies. Profile password policies override org-wide password policies for that profile’s users. Use ProfilePasswordPolicy to retrieve password policies for a given profile. This type extends the Metadata metadata type and inherits its fullName field.

## File Suffix and Directory Location

ProfilePasswordPolicy components have the suffix .profilePasswordPolicy and are stored in the profilePasswordPolicies folder.

## Version

ProfilePasswordPolicy components are available in API version 40.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d772177e85">Field Name</th>

              <th class="featureTableHeader  " id="d772177e88">Field Type</th>

              <th class="featureTableHeader  " id="d772177e91">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">forgotPasswordRedirect</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">boolean</td>

              <td class="entry" headers="d772177e91" data-title="Description">If <samp class="codeph nolang">true</samp>, reset password links in forgot
                password emails don’t immediately expire the first time they’re clicked. Instead,
                the links stay active until a user confirms the password reset request on an
                interstitial page. The default value is <samp class="codeph nolang">false</samp>.<p class="p">This field is available in API version 43.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">lockoutInterval</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. The duration of the login lockout, in minutes. If users are locked
                out, they must wait until the lockout period expires. Valid values: <samp class="codeph java"><span class="number">0</span></samp>, <samp class="codeph java"><span class="number">15</span></samp>, <samp class="codeph java"><span class="number">30</span></samp>, <samp class="codeph java"><span class="number">60</span></samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">maxLoginAttempts</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. The number of times a user can enter a wrong password before getting
                locked out. Valid values: <samp class="codeph java"><span class="number">0</span></samp>, <samp class="codeph java"><span class="number">3</span></samp>, <samp class="codeph java"><span class="number">5</span></samp>, <samp class="codeph java"><span class="number">10</span></samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">minimumPasswordLength</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. Minimum number of characters required for a password. Valid values:
                <samp class="codeph java"><span class="number">5</span></samp>–<samp class="codeph java"><span class="number">50</span></samp>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">minimumPasswordLifetime</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">boolean</td>

              <td class="entry" headers="d772177e91" data-title="Description">If <samp class="codeph java">true</samp>, a user cannot change a password
                more than once in a 24-hour period. </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">obscure</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">boolean</td>

              <td class="entry" headers="d772177e91" data-title="Description">If <samp class="codeph java">true</samp>, answers to security questions are
                hidden as the user types.</td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">passwordComplexity</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. Level of complexity required for the character types in a user’s
                password. <ul class="ul bulletList">
                  <li class="li">If <samp class="codeph java"><span class="number">0</span></samp>, the password can contain any type of
                    character.</li>

                  <li class="li">If <samp class="codeph java"><span class="number">1</span></samp>, the password must contain at least
                    one alphabetic character and 1 number.</li>

                  <li class="li">If <samp class="codeph java"><span class="number">2</span></samp>, the password must contain at least
                    one alphabetic character, one number, and one of the following special
                    characters: ! # $ % - _ = + &lt; &gt;.</li>

                  <li class="li">If <samp class="codeph java"><span class="number">3</span></samp>, the password must contain at least
                    one number, one uppercase letter, and one lowercase letter.</li>

                  <li class="li"> If <samp class="codeph java"><span class="number">4</span></samp>, the password must contain at least
                    one number, one uppercase letter, one lowercase letter, and one of the following
                    special characters: ! # $ % - _ = + &lt; &gt;.</li>

                </ul>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">passwordExpiration</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. Number of days until user passwords expire and must be changed.
                Valid values: <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph java"><span class="number">0</span></samp>—If set to <samp class="codeph java"><span class="number">0</span></samp>, the password never expires.
                  </li>

                  <li class="li"><samp class="codeph java"><span class="number">30</span></samp></li>

                  <li class="li"><samp class="codeph java"><span class="number">60</span></samp></li>

                  <li class="li"><samp class="codeph java"><span class="number">90</span></samp></li>

                  <li class="li"><samp class="codeph java"><span class="number">180</span></samp></li>

                  <li class="li"><samp class="codeph java"><span class="number">365</span></samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">passwordHistory</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. Number of previous passwords to save. Saving passwords is required to
                ensure that users reset their password to a new, unique password. This value must be
                set before a password reset succeeds. If <samp class="codeph java"><span class="number">0</span></samp>,
                <span class="keyword parmname">passwordExpiration</span> must be set to <samp class="codeph java"><span class="number">0</span></samp>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">passwordQuestion</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">int</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. If set to <samp class="codeph java"><span class="number">1</span></samp>, the answer to the
                password hint cannot contain the password itself. If <samp class="codeph java"><span class="number">0</span></samp>, the answer has no restrictions. </td>

            </tr>

            <tr>
              <td class="entry" headers="d772177e85" data-title="Field Name"><span class="keyword parmname">profile</span></td>

              <td class="entry" headers="d772177e88" data-title="Field Type">string</td>

              <td class="entry" headers="d772177e91" data-title="Description">Required. Name of the user profile.</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a ProfilePasswordPolicy component.

<?xml version="1.0" encoding="UTF-8"?>
<ProfilePasswordPolicy xmlns="http://soap.sforce.com/2006/04/metadata">
    <forgotPasswordRedirect\>true</forgotPasswordRedirect\>    
    <lockoutInterval\>30</lockoutInterval\>
    <maxLoginAttempts\>0</maxLoginAttempts\>
    <minimumPasswordLength\>7</minimumPasswordLength\>
    <minimumPasswordLifetime\>false</minimumPasswordLifetime\>
    <obscure\>false</obscure\>
    <passwordComplexity\>1</passwordComplexity\>
    <passwordExpiration\>0</passwordExpiration\>
    <passwordHistory\>0</passwordHistory\>
    <passwordQuestion\>1</passwordQuestion\>
    <profile\>platformportal</profile\>
</ProfilePasswordPolicy\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).