Purchase Batch Failed - InstallApplication Command Response Error

Issue Description:

When trying to install a VPP purchased or non VPP App Store App in a iOS device using "InstallApplication" command from MDM, the device gives "Purchase Batch Failed" error in its response.

Sample InstallApplication Request:

<?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>InstallApplication;Collection=11111</string>
	<key>Command</key>
	<dict>
		<key>RequestType</key>
		<string>InstallApplication</string>
		<key>iTunesStoreID</key>
		<integer>815193300</integer>
		<key>ManagementFlags</key>
		<integer>5</integer>
		<key>Options</key>
		<dict>
			<key>PurchaseMethod</key>
			<integer>1</integer>
		</dict>
		<key>ChangeManagementState</key>
		<string>Managed</string>
		<key>InstallAsManaged</key>
		<true/>
	</dict>
</dict>
</plist>

Sample InstallApplication 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>InstallApplication;Collection=11111</string>
	<key>ErrorChain</key>
	<array>
		<dict>
			<key>ErrorCode</key>
			<integer>1005</integer>
			<key>ErrorDomain</key>
			<string>DeviceManagement.error</string>
			<key>LocalizedDescription</key>
			<string>Could not install app.</string>
		</dict>
		<dict>
			<key>ErrorCode</key>
			<integer>12</integer>
			<key>ErrorDomain</key>
			<string>AMSErrorDomain</string>
			<key>LocalizedDescription</key>
			<string>Purchase Batch Failed</string>
		</dict>
	</array>
	<key>Status</key>
	<string>Error</string>
	<key>UDID</key>
	<string>0000-xxxxx-000000000</string>
</dict>
</plist>

Kindly help understand this case and provide a solution for this. Thanks in advance.

Purchase Batch Failed - InstallApplication Command Response Error
 
 
Q