# Passcode Policy

> Configure the Passcode policy on Apple devices with Applivery. Set minimum length, complexity, expiration, failed attempts and auto-lock, with the exact limits Apple enforces.

Source: https://docs.applivery.com/en/device-management/apple/apple-policies/passcode/  •  Last updated: 2026-08-08

**Key topics:** Apple passcode requirements, Passcode expiration and history, Failed attempts and data erasure, User Enrollment limitations, Applivery, Apple, iOS, macOS

---

**TL;DR:** Set passcode requirements on Apple Devices from Policies > Add configuration > Passcode. No supervision needed. Watch the failed-attempts setting: on iOS it erases the Device.

The passcode is the single control that everything else on an Apple Device depends on. Data Protection encrypts the Device's storage, but that encryption is only meaningful if there's a passcode protecting it — without one, the data is effectively unprotected no matter what else you configure. You can verify both conditions on a Device in [Security Info](https://docs.applivery.com/en/device-management/apple/security-info/).

The **Passcode** configuration is where you define what that passcode has to look like: how long, how complex, how often it changes, and what happens when someone gets it wrong too many times.

## Prerequisites

-   The Apple Device is enrolled in Applivery.
    
-   The Policy is correctly assigned to the target Device(s).
    

:::info
**Supervision is not required.** Apple lists this payload as `Requires supervision: N/A`, so it applies to [supervised](https://docs.applivery.com/en/device-management/apple/supervision/) and unsupervised Devices alike.
:::

## Configuration

Once in the [**Applivery Dashboard**](https://dashboard.applivery.io), go to any of your **Policies** 1. From the left side menu, select **\+ Add configuration** and choose **Passcode** 2.

![passcode](https://docs.applivery.com/int/_r2/media/09ac0a4e-3ad8-478f-9f15-3474973eec71/8fa3efe6-caa7-4975-8881-4e68801a5837.png)

## What you can set

### Requiring a passcode

**Force PIN** is the setting that makes a passcode mandatory. It's **off by default**, which is worth pausing on: without it, none of the other settings force the user to have a passcode at all — they only describe what the passcode must look like _if_ the user sets one.

If you take one thing from this article, take this: turn Force PIN on first, then configure the rest.

### Length and complexity

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What it does</p></th><th colspan="1" rowspan="1"><p>Range</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Minimum length</strong></p></td><td colspan="1" rowspan="1"><p>Minimum overall length of the passcode.</p></td><td colspan="1" rowspan="1"><p>0–16 · default <code>0</code></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Allow simple</strong></p></td><td colspan="1" rowspan="1"><p>When off, blocks repeated characters and sequences such as <code>1111</code>, <code>123</code> or <code>CBA</code>.</p></td><td colspan="1" rowspan="1"><p>Default: <strong>allowed</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Require alphanumeric</strong></p></td><td colspan="1" rowspan="1"><p>Requires letters, not just digits.</p></td><td colspan="1" rowspan="1"><p>Default: off</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Minimum complex characters</strong></p></td><td colspan="1" rowspan="1"><p>Minimum number of characters that are neither letters nor digits — <code>&amp;</code>, <code>%</code>, <code>$</code>, <code>#</code>.</p></td><td colspan="1" rowspan="1"><p>0–4 · default <code>0</code></p></td></tr></tbody></table>

Two details that trip people up:

-   **Minimum length maxes out at 16.** If a security requirement asks for more, it isn't achievable through this payload.
    
-   **Minimum length and minimum complex characters are independent.** Requiring 2 complex characters doesn't imply any total length — set both.
    

For the common requirement of _"a 6-digit PIN that isn't trivial"_: Minimum length `6` + Allow simple **off**, leaving Require alphanumeric off.

### Rotation and reuse

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What it does</p></th><th colspan="1" rowspan="1"><p>Range</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Maximum PIN age in days</strong></p></td><td colspan="1" rowspan="1"><p>Days the passcode can stay unchanged. When the limit is reached, the system forces a change before unlocking.</p></td><td colspan="1" rowspan="1"><p>1–730</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>PIN history</strong></p></td><td colspan="1" rowspan="1"><p>The new passcode must be different from the last N used.</p></td><td colspan="1" rowspan="1"><p>1–50</p></td></tr></tbody></table>

For a 12-month rotation, set 365. Pair it with PIN history, or users will alternate between two passcodes indefinitely.

### Idle locking

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What it does</p></th><th colspan="1" rowspan="1"><p>Range</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Auto-Lock</strong></p></td><td colspan="1" rowspan="1"><p>Maximum idle minutes before the Device locks and asks for the passcode.</p></td><td colspan="1" rowspan="1"><p>0–15 (macOS: up to 60)</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Maximum grace period</strong></p></td><td colspan="1" rowspan="1"><p>Minutes during which the Device can be unlocked again without re-entering the passcode.</p></td><td colspan="1" rowspan="1"><p>Default <code>0</code> — no grace period</p></td></tr></tbody></table>

:::warning
**Auto-Lock is expressed in whole minutes.** There's no sub-minute granularity, so a requirement like _"lock after 90 seconds"_ isn't representable — you have to choose 1 minute (stricter) or 2 (looser). Setting the value also removes the **Never** option from the user's Settings.
:::

Auto-Lock is a **ceiling**, not a fixed value: the user can pick a shorter time, but never a longer one. It's covered in more depth in [Auto-Lock](https://docs.applivery.com/en/device-management/apple/apple-policies/auto-lock/).

### Failed attempts

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What it does</p></th><th colspan="1" rowspan="1"><p>Range</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Maximum failed attempts</strong></p></td><td colspan="1" rowspan="1"><p>Failed passcode entries allowed before the Device erases or locks.</p></td><td colspan="1" rowspan="1"><p>2–11 · default <code>11</code></p></td></tr></tbody></table>

:::warning
**On iOS, iPadOS, visionOS and watchOS, exceeding this limit securely erases all data and settings from the Device.** It doesn't lock it — it wipes it. Only macOS locks instead.

This is not a setting to tighten casually. A low value on a Device used by someone who mistypes their PIN a few times means real data loss, and there's no undo.
:::

After six failed attempts, the Device imposes an increasing time delay between entries. That means values of 6 or lower behave differently from higher ones: there's no delay before the erase or lock; it happens as soon as the limit is passed.

### macOS-only settings

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What it does</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Change at next auth</strong></p></td><td colspan="1" rowspan="1"><p>Forces a password reset the next time the user authenticates. In a device profile, it affects all users, and admin authentications may fail until the admin password is also reset.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Minutes until failed login reset</strong></p></td><td colspan="1" rowspan="1"><p>Minutes before the login resets after the maximum failed attempts. Requires the failed-attempts limit to be set.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Custom regex</strong></p></td><td colspan="1" rowspan="1"><p>A regular expression the password must match, plus a localized description of the rule. macOS 14+.</p></td></tr></tbody></table>

:::warning
Use **Custom regex** only when the standard settings genuinely can't express your requirement. A mistake produces either an unsatisfiable passcode policy or a description that doesn't match what's actually enforced, and the user is the one who discovers it, at the worst moment. The expression uses ICU syntax and is limited to 2048 characters.
:::

## What the Passcode configuration cannot do

Three things are commonly asked for, and none of them live here:

-   **Requiring biometrics.** Apple has no key that forces a user to enrol Face ID or Touch ID. You can restrict biometrics, never mandate them. The verifiable control is the passcode itself.
    
-   **Setting a specific passcode.** The configuration defines _minimums_. Users choose their own passcode and can change it to any other compliant one.
    
-   **Blocking passcode changes.** That's a **Restrictions** setting, and unlike the Passcode payload, it **does require a supervised Device**.
    

## Personal Devices (User Enrollment)

On BYOD Devices enrolled through User Enrollment, Apple accepts the payload but **ignores most of its settings**. Instead, its presence forces a fixed set of rules:

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Setting</p></th><th colspan="1" rowspan="1"><p>What Apple applies</p></th></tr><tr><td colspan="1" rowspan="1"><p>Force PIN</p></td><td colspan="1" rowspan="1"><p>Always on</p></td></tr><tr><td colspan="1" rowspan="1"><p>Minimum length</p></td><td colspan="1" rowspan="1"><p>Always 6</p></td></tr><tr><td colspan="1" rowspan="1"><p>Allow simple</p></td><td colspan="1" rowspan="1"><p>Always off</p></td></tr><tr><td colspan="1" rowspan="1"><p>Auto-Lock</p></td><td colspan="1" rowspan="1"><p><strong>Value ignored</strong> — only the <strong>Never</strong> option disappears from Settings</p></td></tr><tr><td colspan="1" rowspan="1"><p>Minimum complex characters</p></td><td colspan="1" rowspan="1"><p>Ignored</p></td></tr></tbody></table>

Everything else — expiration, history, failed attempts — **is not applied**. If your requirement includes passcode rotation or a specific auto-lock time, User Enrollment can't satisfy it, and you need Device Enrollment or [Automated Device Enrollment](https://docs.applivery.com/en/device-management/apple/enrollment/dep/).

This is the single most common source of _"I configured it, and nothing happened"_ on Apple Devices. Before troubleshooting the Policy, check how the Device was enrolled.
