MDM “RestartDevice” is not a valid request type.

I am following

https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/3-MDM_Protocol/MDM_Protocol.html#//apple_ref/doc/uid/TP40017387-CH3-SW171

for MDM integration.


MDM command request is as follows :


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
   <dict>
      <key>Command</key>
      <dict>
         <key>RequestType</key>
         <string>RestartDevice</string>
      </dict>
      <key>CommandUUID</key>
      <string>67e4a33d-f093-450c-b45e-d27d9d577569</string>
   </dict>
</plist>

I am getting following response :


<?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>67e4a33d-f093-450c-b45e-d27d9d577569</string>
      <key>ErrorChain</key>
      <array>
         <dict>
            <key>ErrorCode</key>
            <integer>12021</integer>
            <key>ErrorDomain</key>
            <string>MCMDMErrorDomain</string>
            <key>LocalizedDescription</key>
            <string>“RestartDevice” is not a valid request type.</string>
            <key>USEnglishDescription</key>
            <string>“RestartDevice” is not a valid request type.</string>
         </dict>
      </array>
      <key>Status</key>
      <string>Error</string>
      <key>UDID</key>
      <string>22c4e464e01a3343123ac47634fa9e081f045ff9</string>
   </dict>
</plist>



I am getting this kind of error for some other request type also like ShutDownDevice, EnableLostMode, etc.


I make sure that device's OS version is above required OS version.


Can anyone please let me know what is wrong here?

the device needs to be supervised too

MDM “RestartDevice” is not a valid request type.
 
 
Q