Andrei Fedorov
Andrei Fedorov

Reputation: 123

Bad request when creating windowsMobileMSI in Intune using microsoft graph api

I'm trying to create a windowsMobileMSI app in intune.

I use the following JSON:

 {
     "@odata.type": "#microsoft.graph.windowsMobileMSI",
     "displayName": "API uploaded Package",
     "description": "Desc of Api uploaded pkg",
     "publisher": "publisher 1",
     "isFeatured": false,
     "privacyInformationUrl": "",
     "informationUrl": null,
     "owner": "owner 1",
     "developer": "dev 1",
     "notes": "no notes",

 //File info    
     "committedContentVersion": "1",
     "fileName": "PackageProvider.msi",
     "size": 409664,
     "identityVersion": "1.0.8",
     "commandLine": "",
     "productCode": "{cc12adbd-8692-458d-b186-9d83b639ff1d}",
     "productVersion": "1.0.8",
     "ignoreVersionDetection": false
 }

However when I post it to

POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps

I get the error message

{
    "error": {
        "code": "BadRequest",
        "message": "An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: fd5ee560-f4da-4255-b893-aa133c60fe4b - Url: https://fef.amsub0102.manage.microsoft.com/StatelessAppMetadataFEService/deviceAppManagement/mobileApps?api-version=5017-10-18 - CustomApiErrorPhrase: ",
        "innerError": {
            "request-id": "fd5ee560-f4da-4255-b893-aa133c60fe4b",
            "date": "2017-12-22T08:31:35"
        }
    }
}

I took the lines below the "//File info" comment from an existing windowsMobileMSI app. I tried removing of these lines but it didn't help me.

Can anyone advise me what is wrong with my JSON?

Upvotes: 1

Views: 408

Answers (2)

Andrei Fedorov
Andrei Fedorov

Reputation: 123

I've got an advice to use only the "identityVersion" after the //File info. So here's the JSON that works now:

{
     "@odata.type": "#microsoft.graph.windowsMobileMSI",
     "displayName": "API uploaded Package",
     "description": "Desc of Api uploaded pkg",
     "publisher": "publisher 1",
     "isFeatured": false,
     "privacyInformationUrl": "",
     "informationUrl": null,
     "owner": "owner 1",
     "developer": "dev 1",
     "notes": "no notes",

 //File info    
     "identityVersion": "1.0.8",
 }

Upvotes: 1

Lee
Lee

Reputation: 11

Try removing "size": 409664 from the JSON.

Upvotes: 0

Related Questions