命名空间:microsoft.graph
注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证。
更新 androidWorkProfileGeneralDeviceConfiguration 对象的属性。
此 API 可用于以下国家级云部署。
| 全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
权限
要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | DeviceManagementConfiguration.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | DeviceManagementConfiguration.ReadWrite.All |
HTTP 请求
PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}
请求标头
| 标头 | 值 |
|---|---|
| Authorization | 持有者 {token}。 必填。 详细了解 身份验证和授权。 |
| 接受 | application/json |
请求正文
在请求正文中,提供 androidWorkProfileGeneralDeviceConfiguration 对象的 JSON 表示形式。
下表显示了创建 androidWorkProfileGeneralDeviceConfiguration 时所需的属性。
| 属性 | 类型 | 说明 |
|---|---|---|
| id | String | 实体的键。 继承自 deviceConfiguration |
| lastModifiedDateTime | DateTimeOffset | 上次修改对象的日期/时间。 继承自 deviceConfiguration |
| createdDateTime | DateTimeOffset | 创建对象的日期/时间。 继承自 deviceConfiguration |
| description | String | 管理员提供的设备配置的说明。 继承自 deviceConfiguration |
| displayName | String | 管理员提供的设备配置的名称。 继承自 deviceConfiguration |
| version | Int32 | 设备配置的版本。 继承自 deviceConfiguration |
| 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 | androidWorkProfileRequiredPasswordType | 必需的密码类型。 可能的值为:deviceDefault、、lowSecurityBiometric、required、atLeastNumericnumericComplex、atLeastAlphabetic、atLeastAlphanumeric、 。 alphanumericWithSymbols |
| workProfileDataSharingType | androidWorkProfileCrossProfileDataSharingType | 允许的数据共享类型。 可能的值包括 deviceDefault、preventAny、allowPersonalToWork、noRestrictions。 |
| workProfileBlockNotificationsWhileDeviceLocked | 布尔值 | 指示在设备锁定时是否阻止通知。 |
| workProfileBlockAddingAccounts | 布尔值 | 阻止用户在工作配置文件中添加/删除帐户。 |
| workProfileBluetoothEnableContactSharing | 布尔值 | 允许蓝牙设备访问企业联系人。 |
| workProfileBlockScreenCapture | 布尔值 | 阻止工作配置文件中的屏幕捕获。 |
| workProfileBlockCrossProfileCallerId | 布尔值 | 阻止在个人配置文件中显示工作配置文件呼叫者 ID。 |
| workProfileBlockCamera | 布尔值 | 阻止工作配置文件相机。 |
| workProfileBlockCrossProfileContactsSearch | 布尔值 | 阻止个人配置文件中的工作配置文件联系人可用性。 |
| workProfileBlockCrossProfileCopyPaste | 布尔值 | 指示设置是否禁止跨配置文件复制/粘贴的布尔值。 |
| workProfileDefaultAppPermissionPolicy | androidWorkProfileDefaultAppPermissionPolicyType | 必需的密码类型。 可能的值包括 deviceDefault、prompt、autoGrant、autoDeny。 |
| workProfilePasswordBlockFingerprintUnlock | 布尔值 | 指示是否阻止工作配置文件的指纹解锁。 |
| workProfilePasswordBlockTrustAgents | 布尔值 | 指示是否阻止工作配置文件的 Smart Lock 和其他信任代理。 |
| workProfilePasswordExpirationDays | Int32 | 工作配置文件密码过期之前的天数。 有效值为 1 至 365。 |
| workProfilePasswordMinimumLength | Int32 | 工作配置文件密码的最小长度。 有效值为 4 至 16 |
| workProfilePasswordMinNumericCharacters | Int32 | 工作配置文件密码中所需的最小数字字符数。 有效值 1 到 10 |
| workProfilePasswordMinNonLetterCharacters | Int32 | 工作配置文件密码中所需的非字母字符的最小数目。 有效值 1 到 10 |
| workProfilePasswordMinLetterCharacters | Int32 | 工作配置文件密码中所需的最少字母字符数。 有效值 1 到 10 |
| workProfilePasswordMinLowerCaseCharacters | Int32 | 工作配置文件密码中所需的最小小写字符数。 有效值 1 到 10 |
| workProfilePasswordMinUpperCaseCharacters | Int32 | 工作配置文件密码中所需的大写字符的最小数目。 有效值 1 到 10 |
| workProfilePasswordMinSymbolCharacters | Int32 | 工作配置文件密码中所需的最少符号数。 有效值 1 到 10 |
| workProfilePasswordMinutesOfInactivityBeforeScreenTimeout | Int32 | 屏幕超时之前的不活动分钟数。 |
| workProfilePasswordPreviousPasswordBlockCount | Int32 | 要阻止的以前工作配置文件密码的数目。 有效值为 0 至 24 |
| workProfilePasswordSignInFailureCountBeforeFactoryReset | Int32 | 删除工作配置文件和删除所有公司数据之前允许的登录失败次数。 有效值 1 到 16 |
| workProfilePasswordRequiredType | androidWorkProfileRequiredPasswordType | 所需的工作配置文件密码类型。 可能的值为:deviceDefault、、lowSecurityBiometric、required、atLeastNumericnumericComplex、atLeastAlphabetic、atLeastAlphanumeric、 。 alphanumericWithSymbols |
| workProfileRequirePassword | 布尔值 | 工作配置文件需要或不需要密码 |
| securityRequireVerifyApps | Boolean | 要求启用 Android 验证应用功能。 |
响应
如果成功,此方法在响应正文中返回响应 200 OK 代码和更新的 androidWorkProfileGeneralDeviceConfiguration 对象。
示例
请求
下面是一个请求示例。
PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/{deviceConfigurationId}
Content-type: application/json
Content-length: 1831
{
"@odata.type": "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration",
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"passwordBlockFingerprintUnlock": true,
"passwordBlockTrustAgents": true,
"passwordExpirationDays": 6,
"passwordMinimumLength": 5,
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,
"passwordPreviousPasswordBlockCount": 2,
"passwordSignInFailureCountBeforeFactoryReset": 12,
"passwordRequiredType": "lowSecurityBiometric",
"workProfileDataSharingType": "preventAny",
"workProfileBlockNotificationsWhileDeviceLocked": true,
"workProfileBlockAddingAccounts": true,
"workProfileBluetoothEnableContactSharing": true,
"workProfileBlockScreenCapture": true,
"workProfileBlockCrossProfileCallerId": true,
"workProfileBlockCamera": true,
"workProfileBlockCrossProfileContactsSearch": true,
"workProfileBlockCrossProfileCopyPaste": true,
"workProfileDefaultAppPermissionPolicy": "prompt",
"workProfilePasswordBlockFingerprintUnlock": true,
"workProfilePasswordBlockTrustAgents": true,
"workProfilePasswordExpirationDays": 1,
"workProfilePasswordMinimumLength": 0,
"workProfilePasswordMinNumericCharacters": 7,
"workProfilePasswordMinNonLetterCharacters": 9,
"workProfilePasswordMinLetterCharacters": 6,
"workProfilePasswordMinLowerCaseCharacters": 9,
"workProfilePasswordMinUpperCaseCharacters": 9,
"workProfilePasswordMinSymbolCharacters": 6,
"workProfilePasswordMinutesOfInactivityBeforeScreenTimeout": 9,
"workProfilePasswordPreviousPasswordBlockCount": 13,
"workProfilePasswordSignInFailureCountBeforeFactoryReset": 7,
"workProfilePasswordRequiredType": "lowSecurityBiometric",
"workProfileRequirePassword": true,
"securityRequireVerifyApps": true
}
响应
下面是一个响应示例。 注意:为简洁起见,可能会截断此处显示的响应对象。 将从实际调用中返回所有属性。
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2003
{
"@odata.type": "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration",
"id": "6decda7e-da7e-6dec-7eda-ec6d7edaec6d",
"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,
"passwordBlockFingerprintUnlock": true,
"passwordBlockTrustAgents": true,
"passwordExpirationDays": 6,
"passwordMinimumLength": 5,
"passwordMinutesOfInactivityBeforeScreenTimeout": 14,
"passwordPreviousPasswordBlockCount": 2,
"passwordSignInFailureCountBeforeFactoryReset": 12,
"passwordRequiredType": "lowSecurityBiometric",
"workProfileDataSharingType": "preventAny",
"workProfileBlockNotificationsWhileDeviceLocked": true,
"workProfileBlockAddingAccounts": true,
"workProfileBluetoothEnableContactSharing": true,
"workProfileBlockScreenCapture": true,
"workProfileBlockCrossProfileCallerId": true,
"workProfileBlockCamera": true,
"workProfileBlockCrossProfileContactsSearch": true,
"workProfileBlockCrossProfileCopyPaste": true,
"workProfileDefaultAppPermissionPolicy": "prompt",
"workProfilePasswordBlockFingerprintUnlock": true,
"workProfilePasswordBlockTrustAgents": true,
"workProfilePasswordExpirationDays": 1,
"workProfilePasswordMinimumLength": 0,
"workProfilePasswordMinNumericCharacters": 7,
"workProfilePasswordMinNonLetterCharacters": 9,
"workProfilePasswordMinLetterCharacters": 6,
"workProfilePasswordMinLowerCaseCharacters": 9,
"workProfilePasswordMinUpperCaseCharacters": 9,
"workProfilePasswordMinSymbolCharacters": 6,
"workProfilePasswordMinutesOfInactivityBeforeScreenTimeout": 9,
"workProfilePasswordPreviousPasswordBlockCount": 13,
"workProfilePasswordSignInFailureCountBeforeFactoryReset": 7,
"workProfilePasswordRequiredType": "lowSecurityBiometric",
"workProfileRequirePassword": true,
"securityRequireVerifyApps": true
}