Custom App(B2B) not installing in a macOS device - Invalid Status Code Error

Issue description:

A custom app is purchased from ABM portal for a location token. The license for the custom app is assigned to device and the "InstallApplication" command is sent to device. But the device gives "Invalid Status Code" 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=1111</string>
	<key>Command</key>
	<dict>
		<key>RequestType</key>
		<string>InstallApplication</string>
		<key>iTunesStoreID</key>
		<integer>1639088235</integer>
		<key>InstallAsManaged</key>
		<true/>
		<key>ManagementFlags</key>
		<integer>5</integer>
		<key>Options</key>
		<dict>
			<key>PurchaseMethod</key>
			<integer>1</integer>
		</dict>
		<key>ChangeManagementState</key>
		<string>Managed</string>
	</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=1111</string>
	<key>ErrorChain</key>
	<array>
		<dict>
			<key>ErrorCode</key>
			<integer>301</integer>
			<key>ErrorDomain</key>
			<string>AMSErrorDomain</string>
			<key>LocalizedDescription</key>
			<string>Invalid Status Code</string>
		</dict>
	</array>
	<key>RejectionReason</key>
	<string>Other</string>
	<key>State</key>
	<string>Failed</string>
	<key>Status</key>
	<string>Error</string>
	<key>UDID</key>
	<string>0000-0000-XXXX-XXXX-000000XXXX</string>
</dict>
</plist>

The App store region of the device and the custom app are same. But the app is installing the device. Kindly help us with this issue

Raised a feedback in Feedback Assistant portal. FB11292074. Kindly help us on this issue.

Custom App(B2B) not installing in a macOS device - Invalid Status Code Error
 
 
Q