Search code examples
iosmacosmdm

MDM payload to wipe an OS X device


I am looking for the correct payload to wipe an OS X device enrolled through MDM. This payload works for iOS devices and the MDM documentation states that it is also supported for OS X devices:

> <?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>EraseDevice</string>
>         </dict>
>         <key>CommandUUID</key>
>         <string>2349d04b-d0ba-404b-afae-4863f85cbba6</string> 
>     </dict>
> </plist>

Currently if I send this payload to an OS X device I get the following error in the error chain:

FindMyMac 'EraseDevice' error

Any ideas?


Solution

  • In order to lock an OS X device a 6 digit PIN must be provided in the payload.

    <?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>EraseDevice</string>
                   <key>PIN</key>
                   <string>123456</string>
               </dict>
               <key>CommandUUID</key>
               <string>2349d04b-d0ba-404b-afae-4863f85cbba6</string> 
          </dict>
    </plist>