In our org, some profiles have their own password policy; these overwrite the general password policy. I would like to return to having only one centralized policy. How can I do that? I cannot find a way to do this via Setup. Could I do this by updating the metadata for profiles directly?
3 Answers
Yes you can do it via metadata.
Thing your looking for is called ProfilePasswordPolicy
<types>
<members>*</members>
<name>ProfilePasswordPolicy</name>
</types>
-
For documentation: After deleting the ProfilePasswordPolicy files, they are generated again with the settings from the central password policy. So this works.– georg w.Commented May 29, 2019 at 16:22
Faced with the same problem, I tried the Salesforce CLI command
sfdx force:source:delete -m ProfilePasswordPolicy
but this returned error No ProfilePasswordPolicy named: * found
Profile password policy metadata API names are not simple or predictable, e.g. PT2_profilePasswordPolicy12524392843
, so this 2-steps approach worked for me to remove all profile-specific password policies:
- sfdx force:source:retrieve -m ProfilePasswordPolicy
- sfdx force:source:delete -p your/source/path/to/profilePasswordPolicies --noprompt
Yes, You need to remove them from each profile and then set on Organization-wide Password Policy.
Here are steps to change it on profile.
- From Setup, enter Profiles in the Quick Find box, then select Profiles. Select a profile.
- Depending on which user interface you’re using, do one of the following.
- Enhanced profile user interface—Click Password Policies, then click Edit.
- Original profile user interface—Click Edit, then scroll to the Password Policies section.
- Change the values for the profile.
Here are steps for Org wide settings.
- From Setup, enter Password Policies in the Quick Find box, then select Password Policies.
- Customize the password settings.
Some good read for you:
View and Edit Password Policies in Profiles
Manage Password Expiration with Password Policies and Permission Sets
-
Hi Tushar, I can edit them on the profile (for example changing "User passwords expire in"), but I cannot remove the password policy settings. I cannot set the settings to be empty.– georg w.Commented May 17, 2019 at 11:13