创建 depMacOSEnrollmentProfileCreate depMacOSEnrollmentProfile

命名空间:microsoft.graphNamespace: microsoft.graph

重要提示: /beta 版本下的 Microsoft Graph API 可能会更改;不支持生产使用。Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

注意: 适用于 Intune 的 Microsoft Graph API 需要适用于租户的 活动 Intune 许可证Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

创建新的 depMacOSEnrollmentProfile 对象。Create a new depMacOSEnrollmentProfile object.

先决条件Prerequisites

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) DeviceManagementServiceConfig.ReadWrite.AllDeviceManagementServiceConfig.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application DeviceManagementServiceConfig.ReadWrite.AllDeviceManagementServiceConfig.ReadWrite.All

HTTP 请求HTTP Request

POST /deviceManagement/depOnboardingSettings/{depOnboardingSettingId}/enrollmentProfiles

请求标头Request headers

标头Header Value
AuthorizationAuthorization Bearer <token>。必需。Bearer <token> Required.
接受Accept application/jsonapplication/json

请求正文Request body

在请求正文中,提供 depMacOSEnrollmentProfile 对象的 JSON 表示形式。In the request body, supply a JSON representation for the depMacOSEnrollmentProfile object.

下表显示创建 depMacOSEnrollmentProfile 时所需的属性。The following table shows the properties that are required when you create the depMacOSEnrollmentProfile.

属性Property 类型Type 说明Description
idid StringString 对象的 GUID 继承自 enrollmentProfileThe GUID for the object Inherited from enrollmentProfile
displayNamedisplayName StringString 配置文件的名称 继承自 enrollmentProfileName of the profile Inherited from enrollmentProfile
说明description StringString 配置文件的说明 继承自 enrollmentProfileDescription of the profile Inherited from enrollmentProfile
requiresUserAuthenticationrequiresUserAuthentication BooleanBoolean 指示配置文件是否要求用户身份验证 继承自 enrollmentProfileIndicates if the profile requires user authentication Inherited from enrollmentProfile
configurationEndpointUrlconfigurationEndpointUrl StringString 用于注册的配置终结点 URL 继承自 enrollmentProfileConfiguration endpoint url to use for Enrollment Inherited from enrollmentProfile
enableAuthenticationViaCompanyPortalenableAuthenticationViaCompanyPortal BooleanBoolean 指示使用 Apple Setup Assistant 而不是公司门户进行身份验证。Indicates to authenticate with Apple Setup Assistant instead of Company Portal. 继承自 enrollmentProfileInherited from enrollmentProfile
requireCompanyPortalOnSetupAssistantEnrolledDevicesrequireCompanyPortalOnSetupAssistantEnrolledDevices BooleanBoolean 指示注册助手注册的设备需要公司门户 继承自 enrollmentProfileIndicates that Company Portal is required on setup assistant enrolled devices Inherited from enrollmentProfile
isDefaultisDefault BooleanBoolean 指示这是否为默认配置文件 继承自 depEnrollmentBaseProfileIndicates if this is the default profile Inherited from depEnrollmentBaseProfile
supervisedModeEnabledsupervisedModeEnabled BooleanBoolean 监督模式,如果为 True,则启用,否则为 false。Supervised mode, True to enable, false otherwise. 有关 https://docs.microsoft.com/intune/deploy-use/enroll-devices-in-microsoft-intune 其他信息,请参阅 。See https://docs.microsoft.com/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. 继承自 depEnrollmentBaseProfileInherited from depEnrollmentBaseProfile
supportDepartmentsupportDepartment StringString 支持部门信息 继承自 depEnrollmentBaseProfileSupport department information Inherited from depEnrollmentBaseProfile
isMandatoryisMandatory BooleanBoolean 指示配置文件是否必需 继承自 depEnrollmentBaseProfileIndicates if the profile is mandatory Inherited from depEnrollmentBaseProfile
locationDisabledlocationDisabled BooleanBoolean 指示位置服务设置窗格是否被禁用 继承自 depEnrollmentBaseProfileIndicates if Location service setup pane is disabled Inherited from depEnrollmentBaseProfile
supportPhoneNumbersupportPhoneNumber StringString 支持电话号码 继承自 depEnrollmentBaseProfileSupport phone number Inherited from depEnrollmentBaseProfile
profileRemovalDisabledprofileRemovalDisabled BooleanBoolean 指示配置文件删除选项是否被禁用 继承自 depEnrollmentBaseProfileIndicates if the profile removal option is disabled Inherited from depEnrollmentBaseProfile
restoreBlockedrestoreBlocked BooleanBoolean 指示是否阻止"还原"设置窗格 继承自 depEnrollmentBaseProfileIndicates if Restore setup pane is blocked Inherited from depEnrollmentBaseProfile
appleIdDisabledappleIdDisabled BooleanBoolean 指示 Apple id 设置窗格是否被禁用 继承自 depEnrollmentBaseProfileIndicates if Apple id setup pane is disabled Inherited from depEnrollmentBaseProfile
termsAndConditionsDisabledtermsAndConditionsDisabled BooleanBoolean 指示是否禁用"条款和条件"设置窗格 继承自 depEnrollmentBaseProfileIndicates if 'Terms and Conditions' setup pane is disabled Inherited from depEnrollmentBaseProfile
touchIdDisabledtouchIdDisabled BooleanBoolean 指示触摸 ID 设置窗格是否被禁用 继承自 depEnrollmentBaseProfileIndicates if touch id setup pane is disabled Inherited from depEnrollmentBaseProfile
applePayDisabledapplePayDisabled BooleanBoolean 指示 Apple 付款设置窗格是否被禁用 继承自 depEnrollmentBaseProfileIndicates if Apple pay setup pane is disabled Inherited from depEnrollmentBaseProfile
siriDisabledsiriDisabled BooleanBoolean 指示是否禁用了 siri 设置窗格 继承自 depEnrollmentBaseProfileIndicates if siri setup pane is disabled Inherited from depEnrollmentBaseProfile
diagnosticsDisableddiagnosticsDisabled BooleanBoolean 指示诊断设置窗格是否被禁用 继承自 depEnrollmentBaseProfileIndicates if diagnostics setup pane is disabled Inherited from depEnrollmentBaseProfile
displayToneSetupDisableddisplayToneSetupDisabled BooleanBoolean 指示是否禁用显示铃声设置屏幕 继承自 depEnrollmentBaseProfileIndicates if displaytone setup screen is disabled Inherited from depEnrollmentBaseProfile
privacyPaneDisabledprivacyPaneDisabled BooleanBoolean 指示是否禁用隐私屏幕 继承自 depEnrollmentBaseProfileIndicates if privacy screen is disabled Inherited from depEnrollmentBaseProfile
screenTimeScreenDisabledscreenTimeScreenDisabled BooleanBoolean 指示是否禁用屏幕超时设置 继承自 depEnrollmentBaseProfileIndicates if screen timeout setup is disabled Inherited from depEnrollmentBaseProfile
deviceNameTemplatedeviceNameTemplate StringString 设置文字或名称模式。Sets a literal or name pattern. 继承自 depEnrollmentBaseProfileInherited from depEnrollmentBaseProfile
configurationWebUrlconfigurationWebUrl BooleanBoolean 设置助理登录的 URL 继承自 depEnrollmentBaseProfileURL for setup assistant login Inherited from depEnrollmentBaseProfile
registrationDisabledregistrationDisabled BooleanBoolean 指示注册是否被禁用Indicates if registration is disabled
fileVaultDisabledfileVaultDisabled BooleanBoolean 指示文件保管库是否被禁用Indicates if file vault is disabled
iCloudDiagnosticsDisablediCloudDiagnosticsDisabled BooleanBoolean 指示 iCloud Analytics 屏幕是否被禁用Indicates if iCloud Analytics screen is disabled
passCodeDisabledpassCodeDisabled BooleanBoolean 指示密码设置窗格是否被禁用Indicates if Passcode setup pane is disabled
zoomDisabledzoomDisabled BooleanBoolean 指示是否禁用了缩放设置窗格Indicates if zoom setup pane is disabled
iCloudStorageDisablediCloudStorageDisabled BooleanBoolean 指示 iCloud 文档和桌面屏幕是否被禁用Indicates if iCloud Documents and Desktop screen is disabled
chooseYourLockScreenDisabledchooseYourLockScreenDisabled BooleanBoolean 指示 iCloud 文档和桌面屏幕是否被禁用Indicates if iCloud Documents and Desktop screen is disabled
accessibilityScreenDisabledaccessibilityScreenDisabled BooleanBoolean 指示辅助功能屏幕是否被禁用Indicates if Accessibility screen is disabled

响应Response

如果成功,此方法在响应正文中返回 响应代码和 201 Created depMacOSEnrollmentProfile 对象。If successful, this method returns a 201 Created response code and a depMacOSEnrollmentProfile object in the response body.

示例Example

请求Request

下面是一个请求示例。Here is an example of the request.

POST https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings/{depOnboardingSettingId}/enrollmentProfiles
Content-type: application/json
Content-length: 1300

{
  "@odata.type": "#microsoft.graph.depMacOSEnrollmentProfile",
  "displayName": "Display Name value",
  "description": "Description value",
  "requiresUserAuthentication": true,
  "configurationEndpointUrl": "https://example.com/configurationEndpointUrl/",
  "enableAuthenticationViaCompanyPortal": true,
  "requireCompanyPortalOnSetupAssistantEnrolledDevices": true,
  "isDefault": true,
  "supervisedModeEnabled": true,
  "supportDepartment": "Support Department value",
  "isMandatory": true,
  "locationDisabled": true,
  "supportPhoneNumber": "Support Phone Number value",
  "profileRemovalDisabled": true,
  "restoreBlocked": true,
  "appleIdDisabled": true,
  "termsAndConditionsDisabled": true,
  "touchIdDisabled": true,
  "applePayDisabled": true,
  "siriDisabled": true,
  "diagnosticsDisabled": true,
  "displayToneSetupDisabled": true,
  "privacyPaneDisabled": true,
  "screenTimeScreenDisabled": true,
  "deviceNameTemplate": "Device Name Template value",
  "configurationWebUrl": true,
  "registrationDisabled": true,
  "fileVaultDisabled": true,
  "iCloudDiagnosticsDisabled": true,
  "passCodeDisabled": true,
  "zoomDisabled": true,
  "iCloudStorageDisabled": true,
  "chooseYourLockScreenDisabled": true,
  "accessibilityScreenDisabled": true
}

响应Response

下面是一个响应示例。注意:为了简单起见,可能会将此处所示的响应对象截断。将从实际调用中返回所有属性。Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1349

{
  "@odata.type": "#microsoft.graph.depMacOSEnrollmentProfile",
  "id": "e433c95c-c95c-e433-5cc9-33e45cc933e4",
  "displayName": "Display Name value",
  "description": "Description value",
  "requiresUserAuthentication": true,
  "configurationEndpointUrl": "https://example.com/configurationEndpointUrl/",
  "enableAuthenticationViaCompanyPortal": true,
  "requireCompanyPortalOnSetupAssistantEnrolledDevices": true,
  "isDefault": true,
  "supervisedModeEnabled": true,
  "supportDepartment": "Support Department value",
  "isMandatory": true,
  "locationDisabled": true,
  "supportPhoneNumber": "Support Phone Number value",
  "profileRemovalDisabled": true,
  "restoreBlocked": true,
  "appleIdDisabled": true,
  "termsAndConditionsDisabled": true,
  "touchIdDisabled": true,
  "applePayDisabled": true,
  "siriDisabled": true,
  "diagnosticsDisabled": true,
  "displayToneSetupDisabled": true,
  "privacyPaneDisabled": true,
  "screenTimeScreenDisabled": true,
  "deviceNameTemplate": "Device Name Template value",
  "configurationWebUrl": true,
  "registrationDisabled": true,
  "fileVaultDisabled": true,
  "iCloudDiagnosticsDisabled": true,
  "passCodeDisabled": true,
  "zoomDisabled": true,
  "iCloudStorageDisabled": true,
  "chooseYourLockScreenDisabled": true,
  "accessibilityScreenDisabled": true
}