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

# Delete User

Delete a user’s account from a device.

## Discussion

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

### Error codes

An error response uses one of the following error codes:

- `12071`: The user doesn’t exist.
- `12072`: The user is currently logged in.
- `12073`: The user has data to sync and ForceDeletion is false or unspecified.
- `12074`: Unable to delete the user. In macOS, this error code also returns for an attempt to delete the last administrator account.

### Command availability

|||
|--------------------------|----------|
|Device channel            |iOS, macOS|
|User channel              |N/A       |
|Requires supervision      |macOS     |
|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>ForceDeletion</key>
        <false/>
        <key>RequestType</key>
        <string>DeleteUser</string>
        <key>UserName</key>
        <string>example@acme.com</string>
    </dict>
    <key>CommandUUID</key>
    <string>0001_DeleteUser</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>CommandUUID</key>
    <string>0001_DeleteUser</string>
    <key>Status</key>
    <string>Acknowledged</string>
    <key>UDID</key>
    <string>cf98820bd143abe0bbf151bed8e8e427594d2f88</string>
</dict>
</plist>
```

## Topics

### Commands and responses

[`object DeleteUserCommand`](/documentation/DeviceManagement/DeleteUserCommand)

The command to delete a user’s account from a device.

[`object DeleteUserResponse`](/documentation/DeviceManagement/DeleteUserResponse)

A response from the device after it processes the command to delete a user’s account from 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)