Contents

Device Lock

Remotely and immediately lock a device.

URL

PUT https://yourmdmhost.example.com/mdm#DeviceLockCommand

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/xml
DeviceLockResponse

The response object the system returns for the Device Lock Command.

Discussion

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.

Refer to the following sections to determine supported channels and requirements, and to see an example request and response.

Command availability

Device channel

iOS, macOS, Shared iPad, visionOS, watchOS

User channel

NA

Requires supervision

macOS

Allowed in user enrollment

iOS, visionOS

Required access right

AllowPasscodeRemovalAndLock

Example request and response

HTTP Body

The request object the server returns for the Device Lock Command.

Topics

Commands and responses

See Also

Device State