<!--
{
  "availability" : [
    "iOS: 9.3.0 -",
    "iPadOS: 9.3.0 -",
    "macCatalyst: 9.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceManagement",
  "identifier" : "/documentation/DeviceManagement/Device-Location-Command",
  "metadataVersion" : "0.1.0",
  "role" : "Web Service Endpoint",
  "symbol" : {
    "kind" : "Web Service Endpoint",
    "modules" : [
      "Device Management"
    ],
    "preciseIdentifier" : "rest:put:mdm#DeviceLocationCommand"
  },
  "title" : "Device Location"
}
-->

# Device Location

Request the location of a device when in Lost Mode.

## Discussion

A device responds with error codes:

- `12067`: If it isn’t in Lost mode.
- `12068`: If its location is unknown.
- `12078`: If the command is invalid while in Lost Mode.

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

### Command availability

|||
|--------------------------|----------------|
|Device channel            |iOS, Shared iPad|
|User channel              |N/A             |
|Requires supervision      |iOS             |
|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>DeviceLocation</string>
    </dict>
    <key>CommandUUID</key>
    <string>0001_DeviceLocation</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>Altitude</key>
    <real>-1.0</real>
    <key>CommandUUID</key>
    <string>0246_DeviceLocation</string>
    <key>Course</key>
    <real>-1.0</real>
    <key>HorizontalAccuracy</key>
    <real>3.677859038862057</real>
    <key>Latitude</key>
    <real>37.33385013244351</real>
    <key>Longitude</key>
    <real>-122.01079213269968</real>
    <key>Speed</key>
    <real>-1.0</real>
    <key>Status</key>
    <string>Acknowledged</string>
    <key>Timestamp</key>
    <string>2019-09-04T22:35:52Z</string>
    <key>UDID</key>
    <string>00008020-000915083C80012E</string>
    <key>VerticalAccuracy</key>
    <real>-1.0</real>
</dict>
</plist>
```

## Topics

### Commands and responses

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

The command to request the location of a device when in Lost Mode.

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

A response from the device after it processes the command to request the location of a device when in Lost Mode.



---

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)