创建 defaultManagedAppProtection
命名空间:microsoft.graph
注意: 适用于 Intune 的 Microsoft Graph API 需要适用于租户的 活动 Intune 许可证。
创建新的 defaultManagedAppProtection 对象。
先决条件
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | DeviceManagementApps.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | DeviceManagementApps.ReadWrite.All |
HTTP 请求
POST /deviceAppManagement/defaultManagedAppProtections
请求标头
| 标头 | 值 |
|---|---|
| Authorization | Bearer <token>。必需。 |
| 接受 | application/json |
请求正文
在请求正文中,提供 defaultManagedAppProtection 对象的 JSON 表示形式。
下表显示创建 defaultManagedAppProtection 时所需的属性。
| 属性 | 类型 | 说明 |
|---|---|---|
| displayName | String | 策略显示名称。 继承自 managedAppPolicy |
| 说明 | 字符串 | 策略的说明。 继承自 managedAppPolicy |
| createdDateTime | DateTimeOffset | 创建策略的日期和时间。 继承自 managedAppPolicy |
| lastModifiedDateTime | DateTimeOffset | 上次修改策略的时间。 继承自 managedAppPolicy |
| id | 字符串 | 实体的键。 继承自 managedAppPolicy |
| version | String | 实体的版本。 继承自 managedAppPolicy |
| periodOfflineBeforeAccessCheck | Duration | 设备未连接到 Internet 时在该时间段后检查访问权限。 继承自 managedAppProtection |
| periodOnlineBeforeAccessCheck | Duration | 设备连接到 Internet 时在该时间段后检查访问权限。 继承自 managedAppProtection |
| allowedInboundDataTransferSources | managedAppDataTransferLevel | 允许传输其中的数据的源。 继承自 managedAppProtection。 可取值为:allApps、managedApps、none。 |
| allowedOutboundDataTransferDestinations | managedAppDataTransferLevel | 允许向其传输数据的目标。 继承自 managedAppProtection。 可取值为:allApps、managedApps、none。 |
| organizationalCredentialsRequired | Boolean | 指示是否需要组织凭据才能使用应用。 继承自 managedAppProtection |
| allowedOutboundClipboardSharingLevel | managedAppClipboardSharingLevel | 可以在托管设备上的应用之间共享剪贴板的级别。 继承自 managedAppProtection。 可取值为:allApps、managedAppsWithPasteIn、managedApps、blocked。 |
| dataBackupBlocked | Boolean | 指示是否阻止备份托管应用的数据。 继承自 managedAppProtection |
| deviceComplianceRequired | Boolean | 指示是否需要设备符合性。 继承自 managedAppProtection |
| managedBrowserToOpenLinksRequired | Boolean | 指示是应在托管浏览器应用中打开 Internet 链接,还是应在适用于 iOS) 的 CustomBrowserProtocol (或 CustomBrowserPackageId/CustomBrowserDisplayName (中为 Android 指定的任何自定义浏览器) 继承自 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。 可取值为:numeric、alphanumericAndSymbol。 |
| periodBeforePinReset | Duration | TimePeriod,如果 PinRequired 设置为 True,必须在此之前重置所有级别的 PIN。 继承自 managedAppProtection |
| allowedDataStorageLocations | managedAppDataStorageLocation 集合 | 用户可能存储托管数据的数据存储位置。 继承自 managedAppProtection。 可能的值是:oneDriveForBusiness、sharePoint、box、localStorage。 |
| 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 |
| managedBrowser | managedBrowserType | 指示在哪个托管浏览器 () 应打开 Internet 链接。 配置此属性时,ManagedBrowserToOpenLinksRequired 应为 true。 继承自 managedAppProtection。 可取值为:notConfigured、microsoftEdge。 |
| appDataEncryptionType | managedAppDataEncryptionType | 应该用于托管应用中的数据的加密类型。 (仅) iOS。 可能的值是:useDeviceSettings、afterDeviceRestart、whenDeviceLockedExceptOpenFiles、whenDeviceLocked。 |
| screenCaptureBlocked | Boolean | 指示是否阻止捕获屏幕。 (仅限 Android) |
| encryptAppData | Boolean | 指示是否应加密托管应用数据。 (仅限 Android) |
| disableAppEncryptionIfDeviceEncryptionIsEnabled | Boolean | 启用此设置后,如果启用了设备级别加密,将禁用应用级别加密。 (仅限 Android) |
| minimumRequiredSdkVersion | String | 低于指定版本的版本将阻止托管应用访问公司数据。 仅 (iOS) |
| customSettings | keyValuePair 集合 | 要发送给受影响用户的一组字符串键和字符串值对,不被此服务改变 |
| deployedAppCount | Int32 | 当前策略部署到的应用的计数。 |
| minimumRequiredPatchVersion | String | 定义用户可以获得对应用的安全访问权限所需的最早的必需 Android 安全修补程序级别。 (仅限 Android) |
| minimumWarningPatchVersion | String | 定义用户可以获得对应用的安全访问权限所需的最早推荐 Android 安全修补程序级别。 (仅限 Android) |
| faceIdBlocked | Boolean | 指示如果 PinRequired 设置为 True,是否允许使用 FaceID 代替 PIN。 仅 (iOS) |
响应
如果成功,此方法在响应正文中返回 201 Created 响应代码和 defaultManagedAppProtection 对象。
示例
请求
下面是一个请求示例。
POST https://graph.microsoft.com/v1.0/deviceAppManagement/defaultManagedAppProtections
Content-type: application/json
Content-length: 2009
{
"@odata.type": "#microsoft.graph.defaultManagedAppProtection",
"displayName": "Display Name value",
"description": "Description 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",
"managedBrowser": "microsoftEdge",
"appDataEncryptionType": "afterDeviceRestart",
"screenCaptureBlocked": true,
"encryptAppData": true,
"disableAppEncryptionIfDeviceEncryptionIsEnabled": true,
"minimumRequiredSdkVersion": "Minimum Required Sdk Version value",
"customSettings": [
{
"@odata.type": "microsoft.graph.keyValuePair",
"name": "Name value",
"value": "Value value"
}
],
"deployedAppCount": 0,
"minimumRequiredPatchVersion": "Minimum Required Patch Version value",
"minimumWarningPatchVersion": "Minimum Warning Patch Version value",
"faceIdBlocked": true
}
响应
下面是一个响应示例。注意:为了简单起见,可能会将此处所示的响应对象截断。将从实际调用中返回所有属性。
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2181
{
"@odata.type": "#microsoft.graph.defaultManagedAppProtection",
"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",
"id": "77064c51-4c51-7706-514c-0677514c0677",
"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",
"managedBrowser": "microsoftEdge",
"appDataEncryptionType": "afterDeviceRestart",
"screenCaptureBlocked": true,
"encryptAppData": true,
"disableAppEncryptionIfDeviceEncryptionIsEnabled": true,
"minimumRequiredSdkVersion": "Minimum Required Sdk Version value",
"customSettings": [
{
"@odata.type": "microsoft.graph.keyValuePair",
"name": "Name value",
"value": "Value value"
}
],
"deployedAppCount": 0,
"minimumRequiredPatchVersion": "Minimum Required Patch Version value",
"minimumWarningPatchVersion": "Minimum Warning Patch Version value",
"faceIdBlocked": true
}
反馈
提交和查看相关反馈