更新 depOnboardingSettingUpdate depOnboardingSetting

命名空间: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.

更新depOnboardingSetting对象的属性。Update the properties of a depOnboardingSetting 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 most to least 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

PATCH /deviceManagement/depOnboardingSettings/{depOnboardingSettingId}

请求标头Request headers

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

请求正文Request body

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

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

属性Property 类型Type 说明Description
idid StringString 对象的 UUIDUUID for the object
appleIdentifierappleIdentifier StringString 用于获取当前令牌的 Apple ID。The Apple ID used to obtain the current token.
tokenExpirationDateTimetokenExpirationDateTime DateTimeOffsetDateTimeOffset 令牌将到期的时间。When the token will expire.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 在载入服务时。When the service was onboarded.
lastSuccessfulSyncDateTimelastSuccessfulSyncDateTime DateTimeOffsetDateTimeOffset 服务上次使用 Intune syned 时When the service last syned with Intune
lastSyncTriggeredDateTimelastSyncTriggeredDateTime DateTimeOffsetDateTimeOffset Intune 上次请求同步时。When Intune last requested a sync.
shareTokenWithSchoolDataSyncServiceshareTokenWithSchoolDataSyncService BooleanBoolean 是否启用了与学校数据同步服务的 Dep 令牌共享。Whether or not the Dep token sharing is enabled with the School Data Sync service.
lastSyncErrorCodelastSyncErrorCode Int32Int32 上一次 dep 同步期间 Apple 报告的错误代码。Error code reported by Apple during last dep sync.
tokenTypetokenType depTokenTypedepTokenType 获取或设置 Dep 令牌类型。Gets or sets the Dep Token Type. 可取值为:nonedepappleSchoolManagerPossible values are: none, dep, appleSchoolManager.
tokenNametokenName StringString Dep 令牌的友好名称Friendly Name for Dep Token
syncedDeviceCountsyncedDeviceCount Int32Int32 获取同步的设备计数Gets synced device count
dataSharingConsentGranteddataSharingConsentGranted BooleanBoolean 为使用 Apple Dep 服务进行数据共享而授予的同意Consent granted for data sharing with Apple Dep Service
roleScopeTagIdsroleScopeTagIds String 集合String collection 此实体实例的范围标记列表。List of Scope Tags for this Entity instance.

响应Response

如果成功,此方法在响应200 OK正文中返回响应代码和更新的depOnboardingSetting对象。If successful, this method returns a 200 OK response code and an updated depOnboardingSetting object in the response body.

示例Example

请求Request

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

PATCH https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings/{depOnboardingSettingId}
Content-type: application/json
Content-length: 576

{
  "@odata.type": "#microsoft.graph.depOnboardingSetting",
  "appleIdentifier": "Apple Identifier value",
  "tokenExpirationDateTime": "2016-12-31T23:59:54.0590989-08:00",
  "lastSuccessfulSyncDateTime": "2017-01-01T00:03:28.120883-08:00",
  "lastSyncTriggeredDateTime": "2017-01-01T00:00:02.0916369-08:00",
  "shareTokenWithSchoolDataSyncService": true,
  "lastSyncErrorCode": 1,
  "tokenType": "dep",
  "tokenName": "Token Name value",
  "syncedDeviceCount": 1,
  "dataSharingConsentGranted": true,
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ]
}

响应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 200 OK
Content-Type: application/json
Content-Length: 689

{
  "@odata.type": "#microsoft.graph.depOnboardingSetting",
  "id": "40342229-2229-4034-2922-344029223440",
  "appleIdentifier": "Apple Identifier value",
  "tokenExpirationDateTime": "2016-12-31T23:59:54.0590989-08:00",
  "lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
  "lastSuccessfulSyncDateTime": "2017-01-01T00:03:28.120883-08:00",
  "lastSyncTriggeredDateTime": "2017-01-01T00:00:02.0916369-08:00",
  "shareTokenWithSchoolDataSyncService": true,
  "lastSyncErrorCode": 1,
  "tokenType": "dep",
  "tokenName": "Token Name value",
  "syncedDeviceCount": 1,
  "dataSharingConsentGranted": true,
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ]
}