mirror of
https://github.com/apple/device-management.git
synced 2026-07-10 21:13:42 +02:00
109 lines
3.3 KiB
YAML
109 lines
3.3 KiB
YAML
title: Device Lock Command
|
|
description: Remotely and immediately lock a device.
|
|
payload:
|
|
requesttype: DeviceLock
|
|
supportedOS:
|
|
iOS:
|
|
introduced: '4.0'
|
|
accessrights: AllowPasscodeRemovalAndLock
|
|
supervised: false
|
|
requiresdep: false
|
|
sharedipad:
|
|
mode: allowed
|
|
devicechannel: true
|
|
userchannel: false
|
|
userenrollment:
|
|
mode: allowed
|
|
macOS:
|
|
introduced: '10.7'
|
|
accessrights: AllowPasscodeRemovalAndLock
|
|
devicechannel: true
|
|
userchannel: false
|
|
supervised: false
|
|
requiresdep: false
|
|
userenrollment:
|
|
mode: forbidden
|
|
tvOS:
|
|
introduced: n/a
|
|
visionOS:
|
|
introduced: '2.0'
|
|
accessrights: AllowPasscodeRemovalAndLock
|
|
supervised: false
|
|
requiresdep: false
|
|
userenrollment:
|
|
mode: allowed
|
|
watchOS:
|
|
introduced: '10.0'
|
|
accessrights: AllowPasscodeRemovalAndLock
|
|
supervised: false
|
|
content: This command allows the server to immediately lock the device. This command
|
|
requires the Device Lock and Passcode Removal right.
|
|
payloadkeys:
|
|
- key: Message
|
|
supportedOS:
|
|
iOS:
|
|
introduced: '7.0'
|
|
sharedipad:
|
|
mode: ignored
|
|
macOS:
|
|
introduced: '10.14'
|
|
visionOS:
|
|
introduced: n/a
|
|
type: <string>
|
|
presence: optional
|
|
content: The message to display on the Lock Screen of the device. This value doesn't
|
|
apply to a Shared iPad device.
|
|
- key: PhoneNumber
|
|
supportedOS:
|
|
iOS:
|
|
introduced: '7.0'
|
|
sharedipad:
|
|
mode: ignored
|
|
macOS:
|
|
introduced: '11.5'
|
|
visionOS:
|
|
introduced: n/a
|
|
type: <string>
|
|
presence: optional
|
|
content: The phone number to display on the Lock Screen. This value doesn't apply
|
|
to a Shared iPad device. This value is available for a Mac with Apple silicon
|
|
only.
|
|
- key: PIN
|
|
supportedOS:
|
|
iOS:
|
|
introduced: n/a
|
|
macOS:
|
|
introduced: '10.8'
|
|
visionOS:
|
|
introduced: n/a
|
|
watchOS:
|
|
introduced: n/a
|
|
type: <string>
|
|
presence: optional
|
|
content: The six-character PIN for Find My.
|
|
responsekeys:
|
|
- key: MessageResult
|
|
type: <string>
|
|
presence: optional
|
|
content: |-
|
|
The message result if the command includes a message or phone number, which is one of the following values:
|
|
|
|
- `Success`: The message displayed successfully.
|
|
- `DeviceInLostMode`: The device is in Lost Mode.
|
|
- `NoPasscodeSet`: The message didn't display because there isn't a set passcode.
|
|
- `Unknown`: An unknown error occurred.
|
|
notes:
|
|
- title: ''
|
|
content: |-
|
|
You can display a message and phone number on the Lock Screen if the user has set a passcode for the device, it isn't a Shared iPad, and it isn't in Lost Mode. In macOS, this command uses the Find My framework to lock a device, and fails if there's no recovery partition on the device.
|
|
|
|
> Warning:
|
|
> Sending this command to a Mac with Apple silicon running a version of macOS before 11.5 deactivates the Mac. To reactivate that Mac, it needs a network connection and authentication by a local administrator with Secure Token enabled.
|
|
|
|
Refer to the following sections to determine supported channels and requirements, and to see an example request and response.
|
|
examples:
|
|
- title: Example request and response
|
|
files:
|
|
- request-file: examples/mdm/commands/device.lock/example1.plist
|
|
response-file: examples/mdm/commands/device.lock/example2.plist
|