创建 windowsAutopilotDeviceIdentity

命名空间:microsoft.graph

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

创建新的 windowsAutopilotDeviceIdentity 对象。

先决条件

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

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

HTTP 请求

POST /deviceManagement/windowsAutopilotDeviceIdentities

请求标头

标头
Authorization Bearer <token>。必需。
接受 application/json

请求正文

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

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

属性 类型 说明
id String 对象的 GUID
groupTag 字符串 Windows autopilot 设备的组标记。
purchaseOrderIdentifier 字符串 Windows autopilot 设备的采购订单标识符。
serialNumber String Windows autopilot 设备序列号。
productKey String Windows autopilot 设备产品密钥。
manufacturer String Windows autopilot 设备的 Oem 制造商。
model String Windows autopilot 设备的模型名称。
enrollmentState enrollmentState Windows autopilot 设备的 Intune 注册状态。 可取值为:unknownenrolledpendingResetfailednotContacted
lastContactedDateTime DateTimeOffset Windows autopilot 设备的 Intune 上次联系日期时间。
addressableUserName 字符串 可寻址用户名。
userPrincipalName String 用户主体名称。
resourceName String 资源名称。
skuNumber 字符串 SKU 编号
systemFamily String 系统系列
azureActiveDirectoryDeviceId 字符串 AAD 设备 ID - 要弃用
managedDeviceId 字符串 托管设备 ID
displayName String 显示名称

响应

如果成功,此方法在响应正文中返回 201 Created 响应代码和 windowsAutopilotDeviceIdentity 对象。

示例

请求

下面是一个请求示例。

POST https://graph.microsoft.com/v1.0/deviceManagement/windowsAutopilotDeviceIdentities
Content-type: application/json
Content-length: 814

{
  "@odata.type": "#microsoft.graph.windowsAutopilotDeviceIdentity",
  "groupTag": "Group Tag value",
  "purchaseOrderIdentifier": "Purchase Order Identifier value",
  "serialNumber": "Serial Number value",
  "productKey": "Product Key value",
  "manufacturer": "Manufacturer value",
  "model": "Model value",
  "enrollmentState": "enrolled",
  "lastContactedDateTime": "2016-12-31T23:58:44.2908994-08:00",
  "addressableUserName": "Addressable User Name value",
  "userPrincipalName": "User Principal Name value",
  "resourceName": "Resource Name value",
  "skuNumber": "Sku Number value",
  "systemFamily": "System Family value",
  "azureActiveDirectoryDeviceId": "Azure Active Directory Device Id value",
  "managedDeviceId": "Managed Device Id value",
  "displayName": "Display Name value"
}

响应

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

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

{
  "@odata.type": "#microsoft.graph.windowsAutopilotDeviceIdentity",
  "id": "fac6f0b1-f0b1-fac6-b1f0-c6fab1f0c6fa",
  "groupTag": "Group Tag value",
  "purchaseOrderIdentifier": "Purchase Order Identifier value",
  "serialNumber": "Serial Number value",
  "productKey": "Product Key value",
  "manufacturer": "Manufacturer value",
  "model": "Model value",
  "enrollmentState": "enrolled",
  "lastContactedDateTime": "2016-12-31T23:58:44.2908994-08:00",
  "addressableUserName": "Addressable User Name value",
  "userPrincipalName": "User Principal Name value",
  "resourceName": "Resource Name value",
  "skuNumber": "Sku Number value",
  "systemFamily": "System Family value",
  "azureActiveDirectoryDeviceId": "Azure Active Directory Device Id value",
  "managedDeviceId": "Managed Device Id value",
  "displayName": "Display Name value"
}