---
title: Device Lock
framework: devicemanagement
role: symbol
role_heading: Web Service Endpoint
path: devicemanagement/device-lock-command
---

# Device Lock

Remotely and immediately lock a device.

## URL

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

## Response Codes

200 OK: The response object the system returns for the Device Lock Command.

## Discussion

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. 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. Command availability  |   |   |   |   |   |  Example request and response

## HTTP Body

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

## Topics

### Commands and responses

- [DeviceLockCommand](devicemanagement/devicelockcommand.md)
- [DeviceLockResponse](devicemanagement/devicelockresponse.md)

## See Also

### Device state

- [Erase Device](devicemanagement/erase-device-command.md)
- [Restart Device](devicemanagement/restart-device-command.md)
- [Shut Down Device](devicemanagement/shut-down-device-command.md)
