0

我想创建一个mobileAppContentFile。为此,我发出 POST 请求:

https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/0122f94e-45c4-458a-a25a-c08135a036fc/microsoft.graph.windowsMobileMSI/contentVersions/1/files

使用此请求正文:

{
    "@odata.type": "#microsoft.graph.mobileAppContentFile",
    "azureStorageUri": "https://NAME.blob.core.windows.net/intune/TestApp.msi",
    "name": "TestApp.msi",
    "isCommitted": false,
    "uploadState": "azureStorageUriRequestPending"
}

我收到201 Created回复但是azureStorageUrinull

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceAppManagement/mobileApps('0122f94e-45c4-458a-a25a-c08135a036fc')/microsoft.graph.windowsMobileMSI/contentVersions('1')/files/$entity",
    "azureStorageUri": null,
    "azureStorageUriExpirationDateTime": null,
    "createdDateTime": "0001-01-01T00:00:00Z",
    "id": "ca57173c-5f67-4048-90bf-3bac136de964",
    "isCommitted": false,
    "manifest": "bWFuaWZlc3Q=",
    "name": "TestApp.msi",
    "size": 0,
    "sizeEncrypted": 0,
    "uploadState": "azureStorageUriRequestPending"
}

可能是什么问题呢?

在此处输入图像描述

4

1 回答 1

0

首先,正如@Marc Lafleur 所说,您需要先将文件上传到Azure sotrage,然后提供它们所需的属性值。其次,在您的请求正文中,您没有填写完整的必需属性。

按照此示例创建一个移动应用程序内容文件:

POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files
Content-type: application/json
Content-length: 342

{
  "@odata.type": "#microsoft.graph.mobileAppContentFile",
  "azureStorageUri": "Azure Storage Uri value",
  "isCommitted": true,
  "name": "Name value",
  "size": 4,
  "sizeEncrypted": 13,
  "azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
  "manifest": "bWFuaWZlc3Q=",
  "uploadState": "transientError"
}
于 2018-01-30T03:09:35.493 回答