命名空间:microsoft.graph
重要:Microsoft支持Intune /beta API,但它们会受到更频繁的更改。 Microsoft建议尽可能使用版本 v1.0。 使用版本选择器检查 API 在 v1.0 版中的可用性。
注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证。
更新 mobileAppInstallStatus 对象的属性。
权限
要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | DeviceManagementApps.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | DeviceManagementApps.ReadWrite.All |
HTTP 请求
PATCH /deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses/{mobileAppInstallStatusId}
PATCH /deviceAppManagement/mobileApps/{mobileAppId}/userStatuses/{userAppInstallStatusId}/deviceStatuses/{mobileAppInstallStatusId}
请求标头
| 标头 | 值 |
|---|---|
| Authorization | 持有者 {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 | 应用的安装状态详细信息。 可能的值为:、、、、、dependencyWithRequirementsNotMetseeInstallErrorCodemanagedAppNoLongerPresentsupersededAppsDetectedsupersedingAppsDetecteduninstallPendingRebootsupersededAppUninstallPendingRebootsupersededAppUninstallFailedremovingSupersededAppsiosAppStoreUpdateFailedToInstallautoInstallDisableddependencyPendingRebootvppAppHasUpdateAvailableuserRejectedUpdatedependencyWithAutoInstallDisabled、minimumPhysicalMemoryNotMetminimumCpuSpeedNotMetminimumLogicalProcessorCountNotMetfileSystemRequirementNotMetuserRejectedInstallappRemovedBySupersedenceseeUninstallErrorCodeuntargetedSupersedingAppsDetecteduserIsNotLoggedIntoAppStorependingRebootinstallingDependenciesregistryRequirementNotMetpowerShellScriptRequirementNotMetcontentDownloadedplatformNotApplicableminimumOsVersionNotMetsupersedingAppsNotApplicable、 。 processorArchitectureNotApplicableminimumDiskSpaceNotMetdependencyFailedToInstallnoAdditionalDetails |
| errorCode | Int32 | 安装或卸载失败的错误代码。 |
| osVersion | String | 操作系统版本 |
| osDescription | String | OS 说明 |
| userName | String | 设备用户名 |
| userPrincipalName | String | 用户主体名称 |
| displayVersion | String | 应用程序的人类可读版本 |
响应
如果成功,此方法在响应正文中返回响应 200 OK 代码和更新的 mobileAppInstallStatus 对象。
示例
请求
下面是一个请求示例。
PATCH https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses/{mobileAppInstallStatusId}
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 200 OK
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"
}