更新 androidManagedAppProtection

命名空间:microsoft.graph

重要: /beta 版本下的 Microsoft Graph API 可能会发生更改;不支持生产用途。

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

更新 androidManagedAppProtection 对象的属性。

先决条件

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

权限类型 权限(从最高特权到最低特权)
委派(工作或学校帐户)
    移动应用管理(MAM) DeviceManagementApps.ReadWrite.All
   策略集 DeviceManagementApps.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序
    移动应用管理(MAM) DeviceManagementApps.ReadWrite.All
   策略集 DeviceManagementApps.ReadWrite.All

HTTP 请求

PATCH /deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtectionId}

请求标头

标头
Authorization Bearer <token>。必需。
接受 application/json

请求正文

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

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

属性 类型 说明
displayName String 策略显示名称。 继承自 managedAppPolicy
description String 策略的说明。 继承自 managedAppPolicy
createdDateTime DateTimeOffset 创建策略的日期和时间。 继承自 managedAppPolicy
lastModifiedDateTime DateTimeOffset 上次修改策略的时间。 继承自 managedAppPolicy
roleScopeTagIds 字符串集合 此实体实例的范围标记列表。 继承自 managedAppPolicy
id String 实体的键。 继承自 managedAppPolicy
version String 实体的版本。 继承自 managedAppPolicy
periodOfflineBeforeAccessCheck Duration 设备未连接到 Internet 时在该时间段后检查访问权限。 继承自 managedAppProtection
periodOnlineBeforeAccessCheck Duration 设备连接到 Internet 时在该时间段后检查访问权限。 继承自 managedAppProtection
allowedInboundDataTransferSources managedAppDataTransferLevel 允许传输其中的数据的源。 继承自 managedAppProtection。 可取值为:allAppsmanagedAppsnone
allowedOutboundDataTransferDestinations managedAppDataTransferLevel 允许向其传输数据的目标。 继承自 managedAppProtection。 可取值为:allAppsmanagedAppsnone
organizationalCredentialsRequired Boolean 指示是否需要组织凭据才能使用应用。 继承自 managedAppProtection
allowedOutboundClipboardSharingLevel managedAppClipboardSharingLevel 可以在托管设备上的应用之间共享剪贴板的级别。 继承自 managedAppProtection。 可取值为:allAppsmanagedAppsWithPasteInmanagedAppsblocked
dataBackupBlocked Boolean 指示是否阻止备份托管应用的数据。 继承自 managedAppProtection
deviceComplianceRequired Boolean 指示是否需要设备符合性。 继承自 managedAppProtection
managedBrowserToOpenLinksRequired Boolean 指示是否应在托管浏览器应用中打开 Internet 链接。 继承自 managedAppProtection
saveAsBlocked Boolean 指示用户是否可以使用“另存为”菜单项保存受保护文件的副本。 继承自 managedAppProtection
periodOfflineBeforeWipeIsEnforced Duration 在擦除所有托管数据之前,允许应用保持从 Internet 断开连接的时间量。 继承自 managedAppProtection
pinRequired Boolean 指示是否需要应用级 PIN。 继承自 managedAppProtection
maximumPinRetries Int32 阻止或擦除托管应用之前,最大错误的引脚重试尝试次数。 继承自 managedAppProtection
simplePinBlocked Boolean 指示是否阻止 simplePin。 继承自 managedAppProtection
minimumPinLength Int32 PinRequired 设置为 True 时应用级 PIN 所需的最小 PIN 长度。继承自 managedAppProtection
pinCharacterSet managedAppPinCharacterSet PinRequired 设置为 True 时可用于应用级 PIN 的字符集。 继承自 managedAppProtection。 可取值为:numericalphanumericAndSymbol
periodBeforePinReset Duration TimePeriod,如果 PinRequired 设置为 True,必须在此之前重置所有级别的 PIN。 继承自 managedAppProtection
allowedDataStorageLocations managedAppDataStorageLocation 集合 用户可能存储托管数据的数据存储位置。 继承自 managedAppProtection。 可取值为:oneDriveForBusinesssharePointlocalStorage
contactSyncBlocked Boolean 指示联系人是否可以同步到用户的设备。 继承自 managedAppProtection
printBlocked Boolean 指示是否允许从托管应用进行打印。 继承自 managedAppProtection
fingerprintBlocked Boolean 指示如果 PinRequired 设置为 True,是否允许使用指纹读取器代替 PIN。 继承自 managedAppProtection
disableAppPinIfDevicePinIsSet Boolean 指示如果设置了设备 PIN,是否需要使用应用 PIN。 继承自 managedAppProtection
minimumRequiredOsVersion String 低于指定版本的版本将阻止托管应用访问公司数据。 继承自 managedAppProtection
minimumWarningOsVersion String 低于指定版本的版本将导致托管应用访问公司数据时出现警告消息。 继承自 managedAppProtection
minimumRequiredAppVersion String 低于指定版本的版本将阻止托管应用访问公司数据。 继承自 managedAppProtection
minimumWarningAppVersion String 低于指定版本的版本将导致托管应用出现警告消息。 继承自 managedAppProtection
minimumWipeOsVersion String 小于或等于指定版本的版本将擦除托管应用和关联的公司数据。 继承自 managedAppProtection
minimumWipeAppVersion String 小于或等于指定版本的版本将擦除托管应用和关联的公司数据。 继承自 managedAppProtection
appActionIfDeviceComplianceRequired managedAppRemediationAction 如果 DeviceComplianceRequired 设置为 true,则定义当设备处于根基或越狱状态时,托管应用行为(阻止或擦除)。 继承自 managedAppProtection。 可取值为:blockwipewarn
appActionIfMaximumPinRetriesExceeded managedAppRemediationAction 根据错误的引脚重试尝试次数定义托管应用行为(阻止或擦除)。 继承自 managedAppProtection。 可取值为:blockwipewarn
pinRequiredInstedOfBiometricTimeout 期限 应用引脚的超时(以分钟为单位),而不是从 managedAppProtection 继承的非生物识别密码
allowedOutboundClipboardSharingExceptionLength Int32 指定可从组织数据和帐户剪切或复制到任何应用程序的字符数。 此设置替代 AllowedOutboundClipboardSharingLevel 限制。 默认值“0”表示不允许出现异常。 继承自 managedAppProtection
notificationRestriction managedAppNotificationRestriction 指定从 managedAppProtection 继承的应用通知限制。 可取值为:allowblockOrganizationalDatablock
isAssigned Boolean 指示策略是否部署到任何包含组。 继承自 targetedManagedAppProtection
targetedAppManagementLevels appManagementLevel 此策略的预期应用管理级别继承自 targetedManagedAppProtection。 可能的值是:unspecifiedunmanagedmdmandroidEnterprise
screenCaptureBlocked Boolean 指示托管用户是否可以对托管应用进行屏幕截图
disableAppEncryptionIfDeviceEncryptionIsEnabled Boolean 启用此设置后,如果启用设备级加密,则应用级加密将被禁用
encryptAppData Boolean 指示是否应加密托管应用的应用程序数据
deployedAppCount Int32 当前策略部署到的应用的计数。
minimumRequiredPatchVersion String 定义用户可以获得对应用的安全访问权限所需的最早的必需 Android 安全修补程序级别。
minimumWarningPatchVersion String 定义用户可以获得对应用的安全访问权限所需的最早推荐 Android 安全修补程序级别。
exemptedAppPackages keyValuePair 集合 此列表中的应用包将不受策略约束,并且能够从托管应用接收数据。
minimumWipePatchVersion String Android 安全修补程序级别小于或等于指定值将擦除托管应用和关联的公司数据。
allowedAndroidDeviceManufacturers String 允许托管应用正常工作的设备制造商的分号分隔列表作为字符串。
appActionIfAndroidDeviceManufacturerNotAllowed managedAppRemediationAction 如果不允许指定的设备制造商,则定义托管应用行为(阻止或擦除)。 可取值为:blockwipewarn
requiredAndroidSafetyNetDeviceAttestationType androidManagedAppSafetyNetDeviceAttestationType 定义托管应用运行的 Android SafetyNet 设备证明要求。 可取值为:nonebasicIntegritybasicIntegrityAndDeviceCertification
appActionIfAndroidSafetyNetDeviceAttestationFailed managedAppRemediationAction 如果指定的 Android SafetyNet 证明查询失败,则定义托管应用行为(警告或阻止)。 可取值为:blockwipewarn
requiredAndroidSafetyNetAppsVerificationType androidManagedAppSafetyNetAppsVerificationType 定义托管应用运行的 Android SafetyNet 应用验证要求。 可取值为:noneenabled
appActionIfAndroidSafetyNetAppsVerificationFailed managedAppRemediationAction 如果指定的 Android 应用验证查询失败,则定义托管应用行为(警告或阻止)。 可取值为:blockwipewarn
customBrowserPackageId String 要在 Android 上打开 Web 链接的自定义浏览器的唯一标识符。
customBrowserDisplayName String 要在 Android 上打开 Web 链接的首选自定义浏览器的友好名称。

响应

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

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/beta/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtectionId}
Content-type: application/json
Content-length: 2967

{
  "@odata.type": "#microsoft.graph.androidManagedAppProtection",
  "displayName": "Display Name value",
  "description": "Description value",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "version": "Version value",
  "periodOfflineBeforeAccessCheck": "-PT17.1357909S",
  "periodOnlineBeforeAccessCheck": "PT35.0018757S",
  "allowedInboundDataTransferSources": "managedApps",
  "allowedOutboundDataTransferDestinations": "managedApps",
  "organizationalCredentialsRequired": true,
  "allowedOutboundClipboardSharingLevel": "managedAppsWithPasteIn",
  "dataBackupBlocked": true,
  "deviceComplianceRequired": true,
  "managedBrowserToOpenLinksRequired": true,
  "saveAsBlocked": true,
  "periodOfflineBeforeWipeIsEnforced": "-PT3M22.1587532S",
  "pinRequired": true,
  "maximumPinRetries": 1,
  "simplePinBlocked": true,
  "minimumPinLength": 0,
  "pinCharacterSet": "alphanumericAndSymbol",
  "periodBeforePinReset": "PT3M29.6631862S",
  "allowedDataStorageLocations": [
    "sharePoint"
  ],
  "contactSyncBlocked": true,
  "printBlocked": true,
  "fingerprintBlocked": true,
  "disableAppPinIfDevicePinIsSet": true,
  "minimumRequiredOsVersion": "Minimum Required Os Version value",
  "minimumWarningOsVersion": "Minimum Warning Os Version value",
  "minimumRequiredAppVersion": "Minimum Required App Version value",
  "minimumWarningAppVersion": "Minimum Warning App Version value",
  "minimumWipeOsVersion": "Minimum Wipe Os Version value",
  "minimumWipeAppVersion": "Minimum Wipe App Version value",
  "appActionIfDeviceComplianceRequired": "wipe",
  "appActionIfMaximumPinRetriesExceeded": "wipe",
  "pinRequiredInsteadOfBiometricTimeout": "-PT3M9.8396734S",
  "allowedOutboundClipboardSharingExceptionLength": 14,
  "notificationRestriction": "blockOrganizationalData",
  "isAssigned": true,
  "targetedAppManagementLevels": "unmanaged",
  "screenCaptureBlocked": true,
  "disableAppEncryptionIfDeviceEncryptionIsEnabled": true,
  "encryptAppData": true,
  "deployedAppCount": 0,
  "minimumRequiredPatchVersion": "Minimum Required Patch Version value",
  "minimumWarningPatchVersion": "Minimum Warning Patch Version value",
  "exemptedAppPackages": [
    {
      "@odata.type": "microsoft.graph.keyValuePair",
      "name": "Name value",
      "value": "Value value"
    }
  ],
  "minimumWipePatchVersion": "Minimum Wipe Patch Version value",
  "allowedAndroidDeviceManufacturers": "Allowed Android Device Manufacturers value",
  "appActionIfAndroidDeviceManufacturerNotAllowed": "wipe",
  "requiredAndroidSafetyNetDeviceAttestationType": "basicIntegrity",
  "appActionIfAndroidSafetyNetDeviceAttestationFailed": "wipe",
  "requiredAndroidSafetyNetAppsVerificationType": "enabled",
  "appActionIfAndroidSafetyNetAppsVerificationFailed": "wipe",
  "customBrowserPackageId": "Custom Browser Package Id value",
  "customBrowserDisplayName": "Custom Browser Display Name value"
}

响应

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

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

{
  "@odata.type": "#microsoft.graph.androidManagedAppProtection",
  "displayName": "Display Name value",
  "description": "Description value",
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "id": "cf517ced-7ced-cf51-ed7c-51cfed7c51cf",
  "version": "Version value",
  "periodOfflineBeforeAccessCheck": "-PT17.1357909S",
  "periodOnlineBeforeAccessCheck": "PT35.0018757S",
  "allowedInboundDataTransferSources": "managedApps",
  "allowedOutboundDataTransferDestinations": "managedApps",
  "organizationalCredentialsRequired": true,
  "allowedOutboundClipboardSharingLevel": "managedAppsWithPasteIn",
  "dataBackupBlocked": true,
  "deviceComplianceRequired": true,
  "managedBrowserToOpenLinksRequired": true,
  "saveAsBlocked": true,
  "periodOfflineBeforeWipeIsEnforced": "-PT3M22.1587532S",
  "pinRequired": true,
  "maximumPinRetries": 1,
  "simplePinBlocked": true,
  "minimumPinLength": 0,
  "pinCharacterSet": "alphanumericAndSymbol",
  "periodBeforePinReset": "PT3M29.6631862S",
  "allowedDataStorageLocations": [
    "sharePoint"
  ],
  "contactSyncBlocked": true,
  "printBlocked": true,
  "fingerprintBlocked": true,
  "disableAppPinIfDevicePinIsSet": true,
  "minimumRequiredOsVersion": "Minimum Required Os Version value",
  "minimumWarningOsVersion": "Minimum Warning Os Version value",
  "minimumRequiredAppVersion": "Minimum Required App Version value",
  "minimumWarningAppVersion": "Minimum Warning App Version value",
  "minimumWipeOsVersion": "Minimum Wipe Os Version value",
  "minimumWipeAppVersion": "Minimum Wipe App Version value",
  "appActionIfDeviceComplianceRequired": "wipe",
  "appActionIfMaximumPinRetriesExceeded": "wipe",
  "pinRequiredInsteadOfBiometricTimeout": "-PT3M9.8396734S",
  "allowedOutboundClipboardSharingExceptionLength": 14,
  "notificationRestriction": "blockOrganizationalData",
  "isAssigned": true,
  "targetedAppManagementLevels": "unmanaged",
  "screenCaptureBlocked": true,
  "disableAppEncryptionIfDeviceEncryptionIsEnabled": true,
  "encryptAppData": true,
  "deployedAppCount": 0,
  "minimumRequiredPatchVersion": "Minimum Required Patch Version value",
  "minimumWarningPatchVersion": "Minimum Warning Patch Version value",
  "exemptedAppPackages": [
    {
      "@odata.type": "microsoft.graph.keyValuePair",
      "name": "Name value",
      "value": "Value value"
    }
  ],
  "minimumWipePatchVersion": "Minimum Wipe Patch Version value",
  "allowedAndroidDeviceManufacturers": "Allowed Android Device Manufacturers value",
  "appActionIfAndroidDeviceManufacturerNotAllowed": "wipe",
  "requiredAndroidSafetyNetDeviceAttestationType": "basicIntegrity",
  "appActionIfAndroidSafetyNetDeviceAttestationFailed": "wipe",
  "requiredAndroidSafetyNetAppsVerificationType": "enabled",
  "appActionIfAndroidSafetyNetAppsVerificationFailed": "wipe",
  "customBrowserPackageId": "Custom Browser Package Id value",
  "customBrowserDisplayName": "Custom Browser Display Name value"
}