<!--
{
  "availability" : [
    "iOS: 7.1.0 -",
    "iPadOS: 7.1.0 -",
    "macCatalyst: 7.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceManagement",
  "identifier" : "/documentation/DeviceManagement/Activation-Lock-Bypass-Code-Command",
  "metadataVersion" : "0.1.0",
  "role" : "Web Service Endpoint",
  "symbol" : {
    "kind" : "Web Service Endpoint",
    "modules" : [
      "Device Management"
    ],
    "preciseIdentifier" : "rest:put:mdm#ActivationLockBypassCodeCommand"
  },
  "title" : "Activation Lock Bypass Code"
}
-->

# Activation Lock Bypass Code

Get the code to bypass Activation Lock on a device.

## Discussion

This command allows organizations to retrieve the device’s bypass code. Organizations can use the bypass code to remove the Activation Lock from supervised devices prior to device activation without knowing the user’s personal Apple Account and password.

Supervised devices generate a device-specific Activation Lock bypass code. The activation server verifies this code to bypass Activation Lock on the device. For more information, see [Creating and using bypass codes](/documentation/DeviceManagement/creating-and-using-bypass-codes).

A device creates a new bypass code when:

- Setting up the device the first time.
- Erasing and not restoring the device from a backup.
- Erasing and restoring the device from a backup from a different device.

### Command availability

|||
|--------------------------|--------------------|
|Device channel            |iOS, macOS, visionOS|
|User channel              |N/A                 |
|Requires supervision      |iOS, macOS, visionOS|
|Allowed in user enrollment|N/A                 |
|Required access right     |N/A                 |

### Example request and response

**Request:**

```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Command</key>
    <dict>
        <key>RequestType</key>
        <string>ActivationLockBypassCode</string>
    </dict>
    <key>CommandUUID</key>
    <string>0001_ActivationLockBypassCode</string>
</dict>
</plist>
```

**Response:**

```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ActivationLockBypassCode</key>
    <string>A8QK7-GFG21-6RHT-V0U9-756P-L7E3</string>
    <key>CommandUUID</key>
    <string>0001_ActivationLockBypassCode</string>
    <key>Status</key>
    <string>Acknowledged</string>
    <key>UDID</key>
    <string>00008020-000915083C80012E</string>
</dict>
</plist>
```

## Topics

### Commands and responses

[`ActivationLockBypassCodeCommand`](/documentation/DeviceManagement/ActivationLockBypassCodeCommand)

The command to get the code to bypass Activation Lock on a device.

[`ActivationLockBypassCodeResponse`](/documentation/DeviceManagement/ActivationLockBypassCodeResponse)

A response from the device after it processes the command to get the code to bypass Activation Lock on a device.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)