powershell-intune-samples icon indicating copy to clipboard operation
powershell-intune-samples copied to clipboard

Application_MDM_Import_FromJSON.ps1 is failing to import applications - Bad request

Open amirjs opened this issue 3 years ago • 2 comments

After exporting an existing app into a json file, if I try and I import the application again (in the same tenant or in a different tenant) I get a bad request. I tested this with 7Zip app I resolved this by adding "size" property to the exclusion properties here:

$JSON_Convert = $JSON_Data | ConvertFrom-Json | Select-Object -Property * -ExcludeProperty id,createdDateTime,lastModifiedDateTime,version,'@odata.context',uploadState,packageId,appIdentifier,publishingState,usedLicenseCount,totalLicenseCount,productKey,licenseType,packageIdentityName,size

amirjs avatar Apr 02 '22 12:04 amirjs

I can also replicate this issue

pchatham avatar Aug 31 '22 15:08 pchatham

Same issue here. Adding the "size" property as suggested above, does not fix the issue.

Freflam avatar May 04 '23 08:05 Freflam