更新 macOSGeneralDeviceConfiguration

命名空间:microsoft.graph

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

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

更新 macOSGeneralDeviceConfiguration 对象的属性。

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

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

权限

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

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

HTTP 请求

PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}
PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}/groupAssignments/{deviceConfigurationGroupAssignmentId}/deviceConfiguration
PATCH /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsDomainJoinConfiguration/networkAccessConfigurations/{deviceConfigurationId}

请求标头

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

请求正文

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

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

属性 类型 说明
id String 实体的键。 继承自 deviceConfiguration
lastModifiedDateTime DateTimeOffset 上次修改对象的日期/时间。 继承自 deviceConfiguration
roleScopeTagIds 字符串集合 此实体实例的范围标记列表。 继承自 deviceConfiguration
supportsScopeTags 布尔值 指示基础设备配置是否支持分配范围标记。 如果此值为 false,并且实体对限定范围的用户不可见,则不允许向 ScopeTags 属性分配。 这发生在 Silverlight 中创建的旧策略,可以通过在 Azure 门户中删除并重新创建策略来解决。 此属性是只读的。 继承自 deviceConfiguration
deviceManagementApplicabilityRuleOsEdition deviceManagementApplicabilityRuleOsEdition 此策略的 OS 版本适用性。 继承自 deviceConfiguration
deviceManagementApplicabilityRuleOsVersion deviceManagementApplicabilityRuleOsVersion 此策略的 OS 版本适用性规则。 继承自 deviceConfiguration
deviceManagementApplicabilityRuleDeviceMode deviceManagementApplicabilityRuleDeviceMode 此策略的设备模式适用性规则。 继承自 deviceConfiguration
createdDateTime DateTimeOffset 创建对象的日期/时间。 继承自 deviceConfiguration
description String 管理员提供的设备配置的说明。 继承自 deviceConfiguration
displayName String 管理员提供的设备配置的名称。 继承自 deviceConfiguration
version Int32 设备配置的版本。 继承自 deviceConfiguration
compliantAppsList appListItem 集合 符合性中的应用列表(允许列表或阻止列表,由 CompliantAppListType 控制)。 该集合最多可包含 10000 个元素。
compliantAppListType appListType 位于 CompliantAppsList 中的列表。 可取值为:noneappsInListCompliantappsNotInListCompliant
emailInDomainSuffixes String 集合 缺少匹配任何这些字符串的后缀的电子邮件地址将被视为超出域范围。
passwordBlockSimple Boolean 阻止简单密码。
passwordExpirationDays Int32 密码过期前的天数。
passwordMinimumCharacterSetCount Int32 密码必须包含的字符集数。 有效值为 0 至 4
passwordMinimumLength Int32 密码的最小长度。
passwordMinutesOfInactivityBeforeLock Int32 在需要密码之前需要不活动的分钟数。
passwordMinutesOfInactivityBeforeScreenTimeout Int32 在屏幕超时之前需要不活动的分钟数。
passwordPreviousPasswordBlockCount Int32 要阻止的以前密码的数量。
passwordRequiredType requiredPasswordType 必需的密码类型。 可取值为:deviceDefaultalphanumericnumeric
passwordRequired Boolean 是否需要密码。
passwordMaximumAttemptCount Int32 允许在设备的锁屏界面上输入密码的失败尝试次数。 有效值 2 到 11
passwordMinutesUntilFailedLoginReset Int32 达到最大登录尝试失败次数后,重置登录名之前的分钟数。
keychainBlockCloudSync 布尔值 指示是否 (macOS 10.12 及更高版本) 阻止 iCloud 密钥链同步。
safariBlockAutofill Boolean 指示在 Safari 中是否阻止用户使用自动填充。
cameraBlocked Boolean 指示是否阻止用户访问设备的照相机。
iTunesBlockMusicService 布尔值 指示是否阻止音乐服务并将音乐应用还原经典模式。
spotlightBlockInternetResults 布尔值 指示是否阻止 Spotlight 从 Internet 搜索返回任何结果。
keyboardBlockDictation 布尔值 指示是否阻止用户使用听写输入。
definitionLookupBlocked 布尔值 指示是否阻止定义查找。
appleWatchBlockAutoUnlock 布尔值 指示是否阻止用户使用 Apple Watch 解锁其 Mac。
iTunesBlockFileSharing 布尔值 指示是否阻止使用 iTunes 传输文件。
iCloudBlockDocumentSync Boolean 指示是否阻止 iCloud 文档同步。
iCloudBlockMail 布尔值 指示是否阻止 iCloud 同步邮件。
iCloudBlockAddressBook 布尔值 指示是否阻止 iCloud 同步联系人。
iCloudBlockCalendar 布尔值 指示是否阻止 iCloud 同步日历。
iCloudBlockReminders 布尔值 指示是否阻止 iCloud 同步提醒。
iCloudBlockBookmarks 布尔值 指示是否阻止 iCloud 同步书签。
iCloudBlockNotes 布尔值 指示是否阻止 iCloud 同步笔记。
airDropBlocked 布尔值 指示是否允许 AirDrop。
passwordBlockModification 布尔值 指示是否允许修改密码。
passwordBlockFingerprintUnlock Boolean 指示是否阻止指纹解锁。
passwordBlockAutoFill 布尔值 指示是否阻止自动填充密码功能。
passwordBlockProximityRequests 布尔值 指示是否阻止从附近的设备请求密码。
passwordBlockAirDropSharing 布尔值 指示是否阻止使用 AirDrop 密码功能共享密码。
softwareUpdatesEnforcedDelayInDays Int32 设置对受监督设备执行软件更新的天数。 有效值为 0 至 90
updateDelayPolicy macOSSoftwareUpdateDelayPolicy 确定是否延迟 macOS 的 OS 和/或应用更新。 可取值为:nonedelayOSUpdateVisibilitydelayAppUpdateVisibilityunknownFutureValuedelayMajorOsUpdateVisibility
contentCachingBlocked 布尔值 指示是否允许内容缓存。
iCloudBlockPhotoLibrary Boolean 指示是否阻止 iCloud 照片库。
screenCaptureBlocked Boolean 指示是否阻止用户进行屏幕截图。
classroomAppBlockRemoteScreenObservation 布尔值 指示是否允许 Classroom 应用进行远程屏幕观察。 需要通过 Apple School Manager 或 Apple Business Manager 进行 MDM 注册。
classroomAppForceUnpromptedScreenObservation 布尔值 指示是否自动向课堂应用上托管课程的教师授予在不提示的情况下查看学生屏幕的权限。 需要通过 Apple School Manager 或 Apple Business Manager 进行 MDM 注册。
classroomForceAutomaticallyJoinClasses 布尔值 指示是否在不提示学生的情况下自动向教师的请求授予权限。 需要通过 Apple School Manager 或 Apple Business Manager 进行 MDM 注册。
classroomForceRequestPermissionToLeaveClasses 布尔值 指示在尝试离开课程时,是否要求通过 Classroom 注册非托管课程的学生向教师请求权限。 需要通过 Apple School Manager 或 Apple Business Manager 进行 MDM 注册。
classroomForceUnpromptedAppAndDeviceLock 布尔值 指示是否允许教师在不提示学生的情况下锁定应用或设备。 需要通过 Apple School Manager 或 Apple Business Manager 进行 MDM 注册。
iCloudBlockActivityContinuation 布尔值 指示是否阻止用户继续在 MacOS 设备上启动的其他 iOS 或 MacOS 设备上的工作, (MacOS 10.15 或更高版本) 。
privacyAccessControls macOSPrivacyAccessControlItem 集合 隐私首选项策略控制列表。 该集合最多可包含 10000 个元素。
addingGameCenterFriendsBlocked 布尔值 “是”会阻止用户将好友添加到游戏中心。 适用于运行 macOS 版本 10.13 及更高版本的设备。
gameCenterBlocked 布尔值 “是”禁用游戏中心,并且游戏中心图标将从主屏幕中删除。 适用于运行 macOS 版本 10.13 及更高版本的设备。
multiplayerGamingBlocked 布尔值 使用游戏中心时,TRUE 会阻止多人游戏。 FALSE 允许使用 Game Center 进行多人游戏。 适用于运行 macOS 版本 10.13 及更高版本的设备。
壁纸ModificationBlocked 布尔值 TRUE 可防止更改壁纸。 FALSE 允许更改壁纸。 适用于运行 macOS 版本 10.13 及更高版本的设备。
eraseContentAndSettingsBlocked 布尔值 TRUE 在受监督的设备上禁用重置选项。 FALSE 在受监督的设备上启用重置选项。 适用于运行 macOS 版本 12.0 及更高版本的设备。
softwareUpdateMajorOSDeferredInstallDelayInDays Int32 指定 (1-90) 的天数,以延迟主要 OS 软件更新的可见性。 适用于运行 macOS 版本 11.3 及更高版本的设备。 有效值为 0 至 90
softwareUpdateMinorOSDeferredInstallDelayInDays Int32 指定 (1-90) 的天数,以延迟次要 OS 软件更新的可见性。 适用于运行 macOS 版本 11.3 及更高版本的设备。 有效值为 0 至 90
softwareUpdateNonOSDeferredInstallDelayInDays Int32 指定 (1-90) 的天数,以延迟非 OS 软件更新的可见性。 适用于运行 macOS 版本 11.3 及更高版本的设备。 有效值为 0 至 90
touchIdTimeoutInHours Int32 用户必须输入其密码才能解锁设备(而不是使用触控 ID)的最大小时数。 适用于运行 macOS 12 及更高版本的设备。 有效值 0 到 2147483647
iCloudPrivateRelayBlocked 布尔值 iCloud 专用中继是一项 iCloud+ 服务,可阻止网络和服务器监视用户在 Internet 上的活动。 通过阻止 iCloud 专用中继,Apple 不会加密离开设备的流量。 适用于运行 macOS 12 及更高版本的设备。
iCloudDesktopAndDocumentsBlocked 布尔值 如果为 TRUE,则会阻止云桌面和文档的同步。 如果为 FALSE,则允许同步云桌面和文档。 适用于运行 macOS 10.12.4 及更高版本的设备。
activationLockWhenSupervisedAllowed 布尔值 如果为 TRUE,则当设备处于监督模式时,允许激活锁。 如果为 FALSE,则不允许激活锁。 默认为 false。

响应

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

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations/{deviceConfigurationId}
Content-type: application/json
Content-length: 5062

{
  "@odata.type": "#microsoft.graph.macOSGeneralDeviceConfiguration",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "supportsScopeTags": true,
  "deviceManagementApplicabilityRuleOsEdition": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsEdition",
    "osEditionTypes": [
      "windows10EnterpriseN"
    ],
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleOsVersion": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsVersion",
    "minOSVersion": "Min OSVersion value",
    "maxOSVersion": "Max OSVersion value",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleDeviceMode": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleDeviceMode",
    "deviceMode": "sModeConfiguration",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "compliantAppsList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "compliantAppListType": "appsInListCompliant",
  "emailInDomainSuffixes": [
    "Email In Domain Suffixes value"
  ],
  "passwordBlockSimple": true,
  "passwordExpirationDays": 6,
  "passwordMinimumCharacterSetCount": 0,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeLock": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordRequiredType": "alphanumeric",
  "passwordRequired": true,
  "passwordMaximumAttemptCount": 11,
  "passwordMinutesUntilFailedLoginReset": 4,
  "keychainBlockCloudSync": true,
  "safariBlockAutofill": true,
  "cameraBlocked": true,
  "iTunesBlockMusicService": true,
  "spotlightBlockInternetResults": true,
  "keyboardBlockDictation": true,
  "definitionLookupBlocked": true,
  "appleWatchBlockAutoUnlock": true,
  "iTunesBlockFileSharing": true,
  "iCloudBlockDocumentSync": true,
  "iCloudBlockMail": true,
  "iCloudBlockAddressBook": true,
  "iCloudBlockCalendar": true,
  "iCloudBlockReminders": true,
  "iCloudBlockBookmarks": true,
  "iCloudBlockNotes": true,
  "airDropBlocked": true,
  "passwordBlockModification": true,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockAutoFill": true,
  "passwordBlockProximityRequests": true,
  "passwordBlockAirDropSharing": true,
  "softwareUpdatesEnforcedDelayInDays": 2,
  "updateDelayPolicy": "delayOSUpdateVisibility",
  "contentCachingBlocked": true,
  "iCloudBlockPhotoLibrary": true,
  "screenCaptureBlocked": true,
  "classroomAppBlockRemoteScreenObservation": true,
  "classroomAppForceUnpromptedScreenObservation": true,
  "classroomForceAutomaticallyJoinClasses": true,
  "classroomForceRequestPermissionToLeaveClasses": true,
  "classroomForceUnpromptedAppAndDeviceLock": true,
  "iCloudBlockActivityContinuation": true,
  "privacyAccessControls": [
    {
      "@odata.type": "microsoft.graph.macOSPrivacyAccessControlItem",
      "displayName": "Display Name value",
      "identifier": "Identifier value",
      "identifierType": "path",
      "codeRequirement": "Code Requirement value",
      "staticCodeValidation": true,
      "blockCamera": true,
      "blockMicrophone": true,
      "blockScreenCapture": true,
      "blockListenEvent": true,
      "speechRecognition": "enabled",
      "accessibility": "enabled",
      "addressBook": "enabled",
      "calendar": "enabled",
      "reminders": "enabled",
      "photos": "enabled",
      "mediaLibrary": "enabled",
      "fileProviderPresence": "enabled",
      "systemPolicyAllFiles": "enabled",
      "systemPolicySystemAdminFiles": "enabled",
      "systemPolicyDesktopFolder": "enabled",
      "systemPolicyDocumentsFolder": "enabled",
      "systemPolicyDownloadsFolder": "enabled",
      "systemPolicyNetworkVolumes": "enabled",
      "systemPolicyRemovableVolumes": "enabled",
      "postEvent": "enabled",
      "appleEventsAllowedReceivers": [
        {
          "@odata.type": "microsoft.graph.macOSAppleEventReceiver",
          "codeRequirement": "Code Requirement value",
          "identifier": "Identifier value",
          "identifierType": "path",
          "allowed": true
        }
      ]
    }
  ],
  "addingGameCenterFriendsBlocked": true,
  "gameCenterBlocked": true,
  "multiplayerGamingBlocked": true,
  "wallpaperModificationBlocked": true,
  "eraseContentAndSettingsBlocked": true,
  "softwareUpdateMajorOSDeferredInstallDelayInDays": 15,
  "softwareUpdateMinorOSDeferredInstallDelayInDays": 15,
  "softwareUpdateNonOSDeferredInstallDelayInDays": 13,
  "touchIdTimeoutInHours": 5,
  "iCloudPrivateRelayBlocked": true,
  "iCloudDesktopAndDocumentsBlocked": true,
  "activationLockWhenSupervisedAllowed": true
}

响应

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

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

{
  "@odata.type": "#microsoft.graph.macOSGeneralDeviceConfiguration",
  "id": "dc356aee-6aee-dc35-ee6a-35dcee6a35dc",
  "lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "supportsScopeTags": true,
  "deviceManagementApplicabilityRuleOsEdition": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsEdition",
    "osEditionTypes": [
      "windows10EnterpriseN"
    ],
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleOsVersion": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsVersion",
    "minOSVersion": "Min OSVersion value",
    "maxOSVersion": "Max OSVersion value",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleDeviceMode": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleDeviceMode",
    "deviceMode": "sModeConfiguration",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "compliantAppsList": [
    {
      "@odata.type": "microsoft.graph.appListItem",
      "name": "Name value",
      "publisher": "Publisher value",
      "appStoreUrl": "https://example.com/appStoreUrl/",
      "appId": "App Id value"
    }
  ],
  "compliantAppListType": "appsInListCompliant",
  "emailInDomainSuffixes": [
    "Email In Domain Suffixes value"
  ],
  "passwordBlockSimple": true,
  "passwordExpirationDays": 6,
  "passwordMinimumCharacterSetCount": 0,
  "passwordMinimumLength": 5,
  "passwordMinutesOfInactivityBeforeLock": 5,
  "passwordMinutesOfInactivityBeforeScreenTimeout": 14,
  "passwordPreviousPasswordBlockCount": 2,
  "passwordRequiredType": "alphanumeric",
  "passwordRequired": true,
  "passwordMaximumAttemptCount": 11,
  "passwordMinutesUntilFailedLoginReset": 4,
  "keychainBlockCloudSync": true,
  "safariBlockAutofill": true,
  "cameraBlocked": true,
  "iTunesBlockMusicService": true,
  "spotlightBlockInternetResults": true,
  "keyboardBlockDictation": true,
  "definitionLookupBlocked": true,
  "appleWatchBlockAutoUnlock": true,
  "iTunesBlockFileSharing": true,
  "iCloudBlockDocumentSync": true,
  "iCloudBlockMail": true,
  "iCloudBlockAddressBook": true,
  "iCloudBlockCalendar": true,
  "iCloudBlockReminders": true,
  "iCloudBlockBookmarks": true,
  "iCloudBlockNotes": true,
  "airDropBlocked": true,
  "passwordBlockModification": true,
  "passwordBlockFingerprintUnlock": true,
  "passwordBlockAutoFill": true,
  "passwordBlockProximityRequests": true,
  "passwordBlockAirDropSharing": true,
  "softwareUpdatesEnforcedDelayInDays": 2,
  "updateDelayPolicy": "delayOSUpdateVisibility",
  "contentCachingBlocked": true,
  "iCloudBlockPhotoLibrary": true,
  "screenCaptureBlocked": true,
  "classroomAppBlockRemoteScreenObservation": true,
  "classroomAppForceUnpromptedScreenObservation": true,
  "classroomForceAutomaticallyJoinClasses": true,
  "classroomForceRequestPermissionToLeaveClasses": true,
  "classroomForceUnpromptedAppAndDeviceLock": true,
  "iCloudBlockActivityContinuation": true,
  "privacyAccessControls": [
    {
      "@odata.type": "microsoft.graph.macOSPrivacyAccessControlItem",
      "displayName": "Display Name value",
      "identifier": "Identifier value",
      "identifierType": "path",
      "codeRequirement": "Code Requirement value",
      "staticCodeValidation": true,
      "blockCamera": true,
      "blockMicrophone": true,
      "blockScreenCapture": true,
      "blockListenEvent": true,
      "speechRecognition": "enabled",
      "accessibility": "enabled",
      "addressBook": "enabled",
      "calendar": "enabled",
      "reminders": "enabled",
      "photos": "enabled",
      "mediaLibrary": "enabled",
      "fileProviderPresence": "enabled",
      "systemPolicyAllFiles": "enabled",
      "systemPolicySystemAdminFiles": "enabled",
      "systemPolicyDesktopFolder": "enabled",
      "systemPolicyDocumentsFolder": "enabled",
      "systemPolicyDownloadsFolder": "enabled",
      "systemPolicyNetworkVolumes": "enabled",
      "systemPolicyRemovableVolumes": "enabled",
      "postEvent": "enabled",
      "appleEventsAllowedReceivers": [
        {
          "@odata.type": "microsoft.graph.macOSAppleEventReceiver",
          "codeRequirement": "Code Requirement value",
          "identifier": "Identifier value",
          "identifierType": "path",
          "allowed": true
        }
      ]
    }
  ],
  "addingGameCenterFriendsBlocked": true,
  "gameCenterBlocked": true,
  "multiplayerGamingBlocked": true,
  "wallpaperModificationBlocked": true,
  "eraseContentAndSettingsBlocked": true,
  "softwareUpdateMajorOSDeferredInstallDelayInDays": 15,
  "softwareUpdateMinorOSDeferredInstallDelayInDays": 15,
  "softwareUpdateNonOSDeferredInstallDelayInDays": 13,
  "touchIdTimeoutInHours": 5,
  "iCloudPrivateRelayBlocked": true,
  "iCloudDesktopAndDocumentsBlocked": true,
  "activationLockWhenSupervisedAllowed": true
}