创建 mobileAppInstallStatus
命名空间:microsoft.graph
重要提示: Microsoft Graph /beta 版本下的 API 可能会更改;不支持生产使用。
注意: 适用于 Intune 的 Microsoft Graph API 需要适用于租户的 活动 Intune 许可证。
创建新的 mobileAppInstallStatus 对象。
先决条件
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | DeviceManagementApps.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | DeviceManagementApps.ReadWrite.All |
HTTP 请求
POST /deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses
POST /deviceAppManagement/mobileApps/{mobileAppId}/userStatuses/{userAppInstallStatusId}/deviceStatuses
请求标头
| 标头 | 值 |
|---|---|
| Authorization | Bearer <token>。必需。 |
| 接受 | application/json |
请求正文
在请求正文中,提供 mobileAppInstallStatus 对象的 JSON 表示形式。
下表显示创建 mobileAppInstallStatus 时所需的属性。
| 属性 | 类型 | 说明 |
|---|---|---|
| id | String | 实体的键。 |
| deviceName | String | 设备名称 |
| deviceId | String | 设备 ID |
| lastSyncDateTime | DateTimeOffset | 上次同步日期时间 |
| mobileAppInstallStatusValue | resultantAppState | 应用的安装状态。 可取值为:installed、failed、notInstalled、uninstallFailed、pendingInstall、unknown 或 notApplicable。 |
| installState | resultantAppState | 应用的安装状态。 可取值为:installed、failed、notInstalled、uninstallFailed、pendingInstall、unknown 或 notApplicable。 |
| installStateDetail | resultantAppStateDetail | 应用的安装状态详细信息。 可能的值是 noAdditionalDetails dependencyFailedToInstall dependencyWithRequirementsNotMet :、、、、、、、、、 dependencyPendingReboot dependencyWithAutoInstallDisabled supersededAppUninstallFailed supersededAppUninstallPendingReboot removingSupersededApps iosAppStoreUpdateFailedToInstall vppAppHasUpdateAvailable userRejectedUpdate uninstallPendingReboot supersedingAppsDetected supersededAppsDetected seeInstallErrorCode autoInstallDisabled managedAppNoLongerPresent userRejectedInstall userIsNotLoggedIntoAppStore untargetedSupersedingAppsDetected appRemovedBySupersedence seeUninstallErrorCode pendingReboot installingDependencies contentDownloaded supersedingAppsNotApplicable powerShellScriptRequirementNotMet registryRequirementNotMet fileSystemRequirementNotMet platformNotApplicable minimumCpuSpeedNotMet minimumLogicalProcessorCountNotMet minimumPhysicalMemoryNotMet minimumOsVersionNotMet minimumDiskSpaceNotMet processorArchitectureNotApplicable |
| errorCode | Int32 | 安装或卸载失败的错误代码。 |
| osVersion | String | 操作系统版本 |
| osDescription | String | 操作系统说明 |
| userName | String | 设备用户名 |
| userPrincipalName | String | 用户主体名称 |
| displayVersion | String | 应用程序的可读人工版本 |
响应
如果成功,此方法在响应 201 Created 正文中返回 响应 代码和 mobileAppInstallStatus 对象。
示例
请求
下面是一个请求示例。
POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses
Content-type: application/json
Content-length: 555
{
"@odata.type": "#microsoft.graph.mobileAppInstallStatus",
"deviceName": "Device Name value",
"deviceId": "Device Id value",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"mobileAppInstallStatusValue": "failed",
"installState": "failed",
"installStateDetail": "dependencyFailedToInstall",
"errorCode": 9,
"osVersion": "Os Version value",
"osDescription": "Os Description value",
"userName": "User Name value",
"userPrincipalName": "User Principal Name value",
"displayVersion": "Display Version value"
}
响应
下面是一个响应示例。注意:为了简单起见,可能会将此处所示的响应对象截断。将从实际调用中返回所有属性。
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 604
{
"@odata.type": "#microsoft.graph.mobileAppInstallStatus",
"id": "7560ee45-ee45-7560-45ee-607545ee6075",
"deviceName": "Device Name value",
"deviceId": "Device Id value",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"mobileAppInstallStatusValue": "failed",
"installState": "failed",
"installStateDetail": "dependencyFailedToInstall",
"errorCode": 9,
"osVersion": "Os Version value",
"osDescription": "Os Description value",
"userName": "User Name value",
"userPrincipalName": "User Principal Name value",
"displayVersion": "Display Version value"
}
反馈
提交和查看相关反馈