更新 androidGeneralDeviceConfiguration

命名空间:microsoft.graph

注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证

更新 androidGeneralDeviceConfiguration 对象的属性。

此 API 可用于以下国家级云部署

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国

权限

要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) DeviceManagementConfiguration.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序 DeviceManagementConfiguration.ReadWrite.All

HTTP 请求

PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}

请求标头

标头
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权
接受 application/json

请求正文

在请求正文中,提供 androidGeneralDeviceConfiguration 对象的 JSON 表示形式。

下表显示创建 androidGeneralDeviceConfiguration 时所需的属性。

属性 类型 说明
id String 实体的键。 继承自 deviceConfiguration
lastModifiedDateTime DateTimeOffset 上次修改对象的日期/时间。 继承自 deviceConfiguration
createdDateTime DateTimeOffset 创建对象的日期/时间。 继承自 deviceConfiguration
description String 管理员提供的设备配置的说明。 继承自 deviceConfiguration
displayName String 管理员提供的设备配置的名称。 继承自 deviceConfiguration
version Int32 设备配置的版本。 继承自 deviceConfiguration
appsBlockClipboardSharing Boolean 指示是否阻止剪贴板共享以在应用程序之间复制和粘贴。
appsBlockCopyPaste Boolean 指示是否阻止在应用程序内复制和粘贴。
appsBlockYouTube Boolean 指示是否阻止 YouTube 应用。
bluetoothBlocked Boolean 指示是否阻止蓝牙。
cameraBlocked Boolean 指示是否阻止照相机的使用。
cellularBlockDataRoaming Boolean 指示是否阻止数据漫游。
cellularBlockMessaging Boolean 指示是否阻止 SMS/MMS 消息。
cellularBlockVoiceRoaming Boolean 指示是否阻止语音漫游。
cellularBlockWiFiTethering Boolean 指示是否阻止同步 Wi-Fi 网络共享。
compliantAppsList appListItem 集合 符合性中的应用列表(允许列表或阻止列表,由 CompliantAppListType 控制)。 该集合最多可包含 10000 个元素。
compliantAppListType appListType 位于 CompliantAppsList 中的列表类型。 可取值为:noneappsInListCompliantappsNotInListCompliant
diagnosticDataBlockSubmission Boolean 指示是否阻止诊断数据提交。
locationServicesBlocked Boolean 指示是否阻止位置服务。
googleAccountBlockAutoSync Boolean 指示是否阻止 Google 帐户自动同步。
googlePlayStoreBlocked Boolean 指示是否阻止 Google Play 商店。
kioskModeBlockSleepButton Boolean 指示在展台模式下是否阻止屏幕睡眠按钮。
kioskModeBlockVolumeButtons Boolean 指示在展台模式下是否阻止音量按钮。
kioskModeApps appListItem 集合 设备处于展台模式时将允许运行的应用列表。 该集合最多可包含 500 个元素。
nfcBlocked Boolean 指示是否阻止近场通信。
passwordBlockFingerprintUnlock Boolean 指示是否阻止指纹解锁。
passwordBlockTrustAgents Boolean 指示是否阻止 Smart Lock 和其他信任代理。
passwordExpirationDays Int32 密码过期前的天数。 有效值为 1 至 365。
passwordMinimumLength Int32 密码的最小长度。 有效值为 4 至 16
passwordMinutesOfInactivityBeforeScreenTimeout Int32 屏幕超时之前的不活动分钟数。
passwordPreviousPasswordBlockCount Int32 要阻止的以前密码的数量。 有效值为 0 至 24
passwordSignInFailureCountBeforeFactoryReset Int32 恢复出厂设置之前允许登录失败的次数。 有效值 1 到 16
passwordRequiredType androidRequiredPasswordType 必需的密码类型。 可取值为:deviceDefaultalphabeticalphanumericalphanumericWithSymbolslowSecurityBiometricnumericnumericComplexany
passwordRequired Boolean 指示是否需要密码。
powerOffBlocked Boolean 指示是否阻止关闭设备。
factoryResetBlocked Boolean 指示是否阻止用户执行恢复出厂设置。
screenCaptureBlocked Boolean 指示是否阻止屏幕截图。
deviceSharingAllowed Boolean 指示是否允许设备共享模式。
storageBlockGoogleBackup Boolean 指示是否阻止 Google 备份。
storageBlockRemovableStorage Boolean 指示是否阻止可移动存储使用。
storageRequireDeviceEncryption Boolean 指示是否需要设备加密。
storageRequireRemovableStorageEncryption Boolean 指示是否需要可移动存储加密。
voiceAssistantBlocked Boolean 指示是否阻止使用语音助手。
voiceDialingBlocked Boolean 指示是否阻止语音拨号。
webBrowserBlockPopups Boolean 指示是否阻止 Web 浏览器内的弹出窗口。
webBrowserBlockAutofill Boolean 指示是否阻止 Web 浏览器的自动填充功能。
webBrowserBlockJavaScript Boolean 指示是否阻止 Web 浏览器内的 JavaScript。
webBrowserBlocked Boolean 指示是否阻止 Web 浏览器。
webBrowserCookieSettings webBrowserCookieSettings Web 浏览器内的 Cookie 设置。 可取值为:browserDefaultblockAlwaysallowCurrentWebSiteallowFromWebsitesVisitedallowAlways
wiFiBlocked Boolean 指示是否阻止同步 Wi-Fi。
appsInstallAllowList appListItem 集合 可以在 KNOX 设备上安装的应用列表。 该集合最多可包含 500 个元素。
appsLaunchBlockList appListItem 集合 阻止在 KNOX 设备上启动的应用列表。 该集合最多可包含 500 个元素。
appsHideList appListItem 集合 要在 KNOX 设备上隐藏的应用列表。 该集合最多可包含 500 个元素。
securityRequireVerifyApps Boolean 要求启用 Android 验证应用功能。

响应

如果成功,此方法在响应正文中返回 200 OK 响应代码和更新的 androidGeneralDeviceConfiguration 对象。

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/{deviceConfigurationId}
Content-type: application/json
Content-length: 3033

{
  "@odata.type": "#microsoft.graph.androidGeneralDeviceConfiguration",
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "appsBlockClipboardSharing": true,
  "appsBlockCopyPaste": true,
  "appsBlockYouTube": true,
  "bluetoothBlocked": true,
  "cameraBlocked": true,
  "cellularBlockDataRoaming": true,
  "cellularBlockMessaging": true,
  "cellularBlockVoiceRoaming": true,
  "cellularBlockWiFiTethering": true,
  "compliantAppsList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "compliantAppListType": "appsInListCompliant",
  "diagnosticDataBlockSubmission": true,
  "locationServicesBlocked": true,
  "googleAccountBlockAutoSync": true,
  "googlePlayStoreBlocked": true,
  "kioskModeBlockSleepButton": true,
  "kioskModeBlockVolumeButtons": true,
  "kioskModeApps": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "nfcBlocked": true,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockTrustAgents": true,
  "passwordExpirationDays": 6,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordSignInFailureCountBeforeFactoryReset": 12,
  "passwordRequiredType": "alphabetic",
  "passwordRequired": true,
  "powerOffBlocked": true,
  "factoryResetBlocked": true,
  "screenCaptureBlocked": true,
  "deviceSharingAllowed": true,
  "storageBlockGoogleBackup": true,
  "storageBlockRemovableStorage": true,
  "storageRequireDeviceEncryption": true,
  "storageRequireRemovableStorageEncryption": true,
  "voiceAssistantBlocked": true,
  "voiceDialingBlocked": true,
  "webBrowserBlockPopups": true,
  "webBrowserBlockAutofill": true,
  "webBrowserBlockJavaScript": true,
  "webBrowserBlocked": true,
  "webBrowserCookieSettings": "blockAlways",
  "wiFiBlocked": true,
  "appsInstallAllowList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "appsLaunchBlockList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "appsHideList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "securityRequireVerifyApps": true
}

响应

下面是一个响应示例。 注意:为简洁起见,可能会截断此处显示的响应对象。 将从实际调用中返回所有属性。

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3205

{
  "@odata.type": "#microsoft.graph.androidGeneralDeviceConfiguration",
  "id": "9e00d534-d534-9e00-34d5-009e34d5009e",
  "lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "appsBlockClipboardSharing": true,
  "appsBlockCopyPaste": true,
  "appsBlockYouTube": true,
  "bluetoothBlocked": true,
  "cameraBlocked": true,
  "cellularBlockDataRoaming": true,
  "cellularBlockMessaging": true,
  "cellularBlockVoiceRoaming": true,
  "cellularBlockWiFiTethering": true,
  "compliantAppsList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "compliantAppListType": "appsInListCompliant",
  "diagnosticDataBlockSubmission": true,
  "locationServicesBlocked": true,
  "googleAccountBlockAutoSync": true,
  "googlePlayStoreBlocked": true,
  "kioskModeBlockSleepButton": true,
  "kioskModeBlockVolumeButtons": true,
  "kioskModeApps": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "nfcBlocked": true,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockTrustAgents": true,
  "passwordExpirationDays": 6,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordSignInFailureCountBeforeFactoryReset": 12,
  "passwordRequiredType": "alphabetic",
  "passwordRequired": true,
  "powerOffBlocked": true,
  "factoryResetBlocked": true,
  "screenCaptureBlocked": true,
  "deviceSharingAllowed": true,
  "storageBlockGoogleBackup": true,
  "storageBlockRemovableStorage": true,
  "storageRequireDeviceEncryption": true,
  "storageRequireRemovableStorageEncryption": true,
  "voiceAssistantBlocked": true,
  "voiceDialingBlocked": true,
  "webBrowserBlockPopups": true,
  "webBrowserBlockAutofill": true,
  "webBrowserBlockJavaScript": true,
  "webBrowserBlocked": true,
  "webBrowserCookieSettings": "blockAlways",
  "wiFiBlocked": true,
  "appsInstallAllowList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "appsLaunchBlockList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "appsHideList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "securityRequireVerifyApps": true
}