Crear comanagementEligibleDeviceCreate comanagementEligibleDevice

Espacio de nombres: microsoft.graphNamespace: microsoft.graph

Importante: Las API de Microsoft Graph en la versión/beta están sujetas a cambios; no se admite el uso de producción.Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Nota: la API de Microsoft Graph para Intune requiere una licencia activa de Intune para el espacio empresarial.Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Cree un nuevo objeto comanagementEligibleDevice .Create a new comanagementEligibleDevice object.

Requisitos previosPrerequisites

Se requiere uno de los siguientes permisos para llamar a esta API. Para obtener más información, incluido cómo elegir permisos, vea Permisos.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Tipo de permisoPermission type Permisos (de más a menos privilegiados)Permissions (from most to least privileged)
Delegado (cuenta profesional o educativa)Delegated (work or school account) DeviceManagementManagedDevices.ReadWrite.AllDeviceManagementManagedDevices.ReadWrite.All
Delegado (cuenta personal de Microsoft)Delegated (personal Microsoft account) No admitida.Not supported.
AplicaciónApplication DeviceManagementManagedDevices.ReadWrite.AllDeviceManagementManagedDevices.ReadWrite.All

Solicitud HTTPHTTP Request

POST /deviceManagement/comanagementEligibleDevices

Encabezados de solicitudRequest headers

EncabezadoHeader ValorValue
AuthorizationAuthorization Se requiere <token> de portador.Bearer <token> Required.
AceptarAccept application/jsonapplication/json

Cuerpo de la solicitudRequest body

En el cuerpo de la solicitud, especifique una representación JSON del objeto comanagementEligibleDevice.In the request body, supply a JSON representation for the comanagementEligibleDevice object.

En la tabla siguiente se muestran las propiedades necesarias para crear el comanagementEligibleDevice.The following table shows the properties that are required when you create the comanagementEligibleDevice.

PropiedadProperty TipoType DescripciónDescription
idid CadenaString Identificador único del dispositivoUnique Id for the device
deviceNamedeviceName CadenaString DeviceNameDeviceName
deviceTypedeviceType deviceTypedeviceType DeviceType.DeviceType. Los valores posibles son: desktop , windowsRT , winMO6 , nokia ,,, windowsPhone mac winCE , winEmbedded ,, iPhone iPad iPod android iSocConsumer unix macMDM holoLens surfaceHub androidForWork androidEnterprise windows10x androidnGMS cloudPC blackberry palm unknown ,,,,,,,,,,,,, y.Possible values are: desktop, windowsRT, winMO6, nokia, windowsPhone, mac, winCE, winEmbedded, iPhone, iPad, iPod, android, iSocConsumer, unix, macMDM, holoLens, surfaceHub, androidForWork, androidEnterprise, windows10x, androidnGMS, cloudPC, blackberry, palm, unknown.
clientRegistrationStatusclientRegistrationStatus deviceRegistrationStatedeviceRegistrationState ClientRegistrationStatus.ClientRegistrationStatus. Los valores posibles son: notRegistered, registered, revoked, keyConflict, approvalPending, certificateReset, notRegisteredPendingEnrollment y unknown.Possible values are: notRegistered, registered, revoked, keyConflict, approvalPending, certificateReset, notRegisteredPendingEnrollment, unknown.
ownerTypeownerType ownerTypeownerType OwnerType.OwnerType. Los valores posibles son: unknown, company y personal.Possible values are: unknown, company, personal.
managementAgentsmanagementAgents managementAgentTypemanagementAgentType ManagementAgents.ManagementAgents. Los valores posibles son: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController y microsoft365ManagedMdm.Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController, microsoft365ManagedMdm.
managementStatemanagementState managementStatemanagementState ManagementState.ManagementState. Los valores posibles son: managed, retirePending, retireFailed, wipePending, wipeFailed, unhealthy, deletePending, retireIssued, wipeIssued, wipeCanceled, retireCanceled y discovered.Possible values are: managed, retirePending, retireFailed, wipePending, wipeFailed, unhealthy, deletePending, retireIssued, wipeIssued, wipeCanceled, retireCanceled, discovered.
IdentificadorreferenceId CadenaString ReferenceIdReferenceId
mdmStatusmdmStatus CadenaString MDMStatusMDMStatus
osVersionosVersion CadenaString OSVersionOSVersion
serialNumberserialNumber CadenaString Número de serie.SerialNumber
manufacturermanufacturer CadenaString ManufacturerManufacturer
modelmodel CadenaString ModelModel
osDescriptionosDescription StringString OSDescriptionOSDescription
entitySourceentitySource Int32Int32 EntitySourceEntitySource
userIduserId CadenaString UserIdUserId
principalupn CadenaString UPNUPN
userEmailuserEmail CadenaString UserEmailUserEmail
userNameuserName CadenaString UserNameUserName
statusstatus comanagementEligibleTypecomanagementEligibleType ComanagementEligibleStatus.ComanagementEligibleStatus. Los valores posibles son: comanaged, eligible, eligibleButNotAzureAdJoined, needsOsUpdate y ineligible.Possible values are: comanaged, eligible, eligibleButNotAzureAdJoined, needsOsUpdate, ineligible.

RespuestaResponse

Si se ejecuta correctamente, este método devuelve un 201 Created código de respuesta y un objeto comanagementEligibleDevice en el cuerpo de la respuesta.If successful, this method returns a 201 Created response code and a comanagementEligibleDevice object in the response body.

EjemploExample

SolicitudRequest

Aquí tiene un ejemplo de la solicitud.Here is an example of the request.

POST https://graph.microsoft.com/beta/deviceManagement/comanagementEligibleDevices
Content-type: application/json
Content-length: 714

{
  "@odata.type": "#microsoft.graph.comanagementEligibleDevice",
  "deviceName": "Device Name value",
  "deviceType": "windowsRT",
  "clientRegistrationStatus": "registered",
  "ownerType": "company",
  "managementAgents": "mdm",
  "managementState": "retirePending",
  "referenceId": "Reference Id value",
  "mdmStatus": "Mdm Status value",
  "osVersion": "Os Version value",
  "serialNumber": "Serial Number value",
  "manufacturer": "Manufacturer value",
  "model": "Model value",
  "osDescription": "Os Description value",
  "entitySource": 12,
  "userId": "User Id value",
  "upn": "Upn value",
  "userEmail": "User Email value",
  "userName": "User Name value",
  "status": "eligible"
}

RespuestaResponse

Aquí tiene un ejemplo de la respuesta. Nota: Puede que el objeto de respuesta que aparece aquí se trunque para abreviar. Todas las propiedades se devolverán de una llamada real.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: 763

{
  "@odata.type": "#microsoft.graph.comanagementEligibleDevice",
  "id": "ac20683b-683b-ac20-3b68-20ac3b6820ac",
  "deviceName": "Device Name value",
  "deviceType": "windowsRT",
  "clientRegistrationStatus": "registered",
  "ownerType": "company",
  "managementAgents": "mdm",
  "managementState": "retirePending",
  "referenceId": "Reference Id value",
  "mdmStatus": "Mdm Status value",
  "osVersion": "Os Version value",
  "serialNumber": "Serial Number value",
  "manufacturer": "Manufacturer value",
  "model": "Model value",
  "osDescription": "Os Description value",
  "entitySource": 12,
  "userId": "User Id value",
  "upn": "Upn value",
  "userEmail": "User Email value",
  "userName": "User Name value",
  "status": "eligible"
}