PasscodeSettings
The declaration to configure passcode policy settings.
Declaration
object PasscodeSettingsProperties
| Name | Type | Description |
|---|---|---|
ChangeAtNextAuth | boolean | If |
CustomRegex | PasscodeSettingsCustomRegexObject | Specifies a regular expression, and its description, to enforce password compliance. Use the simpler passcode settings whenever possible, and rely on regular expression matching only when necessary. Mistakes in regular expressions can lead to frustrating user experiences, such as unsatisfiable passcode policies, or policy descriptions that don’t match the enforced policy. |
FailedAttemptsResetInMinutes | integer | The number of minutes before the login is reset after the maximum number of failed attempts. Also set the |
MaximumFailedAttempts | integer | The number of failed passcode attempts that the system allows the user before it erases or locks the device. After six failed attempts, the device imposes a time delay before the user can enter a passcode again. The time delay increases with each failed attempt. On macOS, set After the final failed attempt, the system locks a macOS device, or securely erases all data and settings from an iOS, visionOS, or watchOS device. |
MaximumGracePeriodInMinutes | integer | The maximum period that a user can select, during which the user can unlock the device without a passcode. A value of |
MaximumInactivityInMinutes | integer | The maximum period that a user can select, during which the device can be idle before the system automatically locks it. When the device reaches this limit, the device locks and the user must enter the passcode to unlock it. In the absence of this key, the user can select any period. In macOS, the system translates this to screensaver settings. |
MaximumPasscodeAgeInDays | integer | Specifies the maximum number of days that the passcode can remain unchanged. After this number of days, the system forces the user to change the passcode before it unlocks the device. |
MinimumComplexCharacters | integer | Specifies the minimum number of complex characters in the password. A complex character is a character other than a number or a letter, such as |
MinimumLength | integer | The minimum number of characters a passcode can contain. |
PasscodeReuseLimit | integer | The number of historical passcode entries the system checks when validating a new passcode. The device refuses a new passcode if it matches a previously used passcode within the specified passcode history range. In the absence of this key, the system performs no historical check. |
RequireAlphanumericPasscode | boolean | If |
RequireComplexPasscode | boolean | If |
RequirePasscode | boolean | If |
Discussion
Specify com.apple.configuration.passcode.settings as the declaration type.
The presence of this configuration type causes the device to present the user with a passcode entry mechanism. The configuration controls the complexity of the passcode.
For user enrollments, the system allows this configuration type, but ignores most of the keys. Instead, the presence of the configuration forces only these settings:
RequirePasscode: always set totrueRequireComplexPasscode: always set totrueMinimumLength: always set to6MaximumInactivityInMinutes: if this key is present its value is ignored, but theneveroption is removed in the Settings UI.
Configuration availability
Allowed in supervised enrollment | iOS, macOS, Shared iPad, visionOS, watchOS |
Allowed in device enrollment | iOS, Shared iPad, visionOS |
Allowed in user enrollment | iOS, Shared iPad, visionOS |
Allowed in local enrollment | iOS, macOS, Shared iPad, visionOS, watchOS |
Allowed in system scope | iOS, macOS, visionOS, watchOS |
Allowed in user scope | macOS |