Erstellen von „managedDevice“Create managedDevice

Namespace: microsoft.graphNamespace: microsoft.graph

Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Diese Methode erstellt ein neues Objekt des Typs managedDevice.Create a new managedDevice object.

VoraussetzungenPrerequisites

Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

BerechtigungstypPermission type Berechtigungen (von der Berechtigung mit den meisten Rechten zu der mit den wenigsten Rechten)Permissions (from most to least privileged)
Delegiert (Geschäfts-, Schul- oder Unikonto)Delegated (work or school account) DeviceManagementManagedDevices.ReadWrite.AllDeviceManagementManagedDevices.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)Delegated (personal Microsoft account) Nicht unterstütztNot supported.
AnwendungApplication Nicht unterstütztNot supported.

HTTP-AnforderungHTTP Request

POST /users/{usersId}/managedDevices
POST /deviceManagement/managedDevices
POST /deviceManagement/detectedApps/{detectedAppId}/managedDevices

AnforderungsheaderRequest headers

KopfzeileHeader WertValue
AuthorizationAuthorization Bearer<token> erforderlichBearer <token> Required.
AnnehmenAccept application/jsonapplication/json

AnforderungstextRequest body

Geben Sie als Anforderungstext eine JSON-Darstellung des Objekts des Typs „managedDevice“ an.In the request body, supply a JSON representation for the managedDevice object.

In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie ein Objekt des Typs „managedDevice“ erstellen.The following table shows the properties that are required when you create the managedDevice.

EigenschaftProperty TypType BeschreibungDescription
idid ZeichenfolgeString Eindeutiger Bezeichner für das GerätUnique Identifier for the device
userIduserId StringString Eindeutiger Bezeichner des Benutzers, der dem Gerät zugeordnet istUnique Identifier for the user associated with the device
deviceNamedeviceName StringString Der Name des Geräts.Name of the device
managedDeviceOwnerTypemanagedDeviceOwnerType managedDeviceOwnerTypemanagedDeviceOwnerType Besitz des Geräts.Ownership of the device. Kann "Unternehmen" oder "persönlich" sein.Can be 'company' or 'personal'. Mögliche Werte sind: unknown, company und personal.Possible values are: unknown, company, personal.
deviceActionResultsdeviceActionResults deviceActionResult-SammlungdeviceActionResult collection Liste von ComplexType DeviceActionResult-Objekten.List of ComplexType deviceActionResult objects.
enrolledDateTimeenrolledDateTime DateTimeOffsetDateTimeOffset Registrierungszeit des Geräts.Enrollment time of the device.
lastSyncDateTimelastSyncDateTime DateTimeOffsetDateTimeOffset Datum und Uhrzeit, zu dem bzw. der das Gerät zuletzt eine erfolgreiche Synchronisierung mit Intune durchgeführt hat.The date and time that the device last completed a successful sync with Intune.
operatingSystemoperatingSystem StringString Betriebssystem des GerätsOperating system of the device. Windows, iOS, etc.Windows, iOS, etc.
complianceStatecomplianceState complianceStatecomplianceState Compliancestatus des Geräts.Compliance state of the device. Mögliche Werte: unknown, compliant, noncompliant, conflict, error, inGracePeriod, configManager.Possible values are: unknown, compliant, noncompliant, conflict, error, inGracePeriod, configManager.
jailBrokenjailBroken StringString Gibt an, ob es sich um ein Gerät mit Jailbreak oder Rootzugriff handelt.whether the device is jail broken or rooted.
managementAgentmanagementAgent managementAgentTypemanagementAgentType Verwaltungskanal des Geräts.Management channel of the device. Intune, EAS usw. Mögliche Werte sind: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController.Intune, EAS, etc. Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController.
osVersionosVersion StringString Betriebssystemversion auf dem Gerät.Operating system version of the device.
easActivatedeasActivated Boolescher WertBoolean Gibt an, ob das Gerät über Exchange ActiveSync-aktiviert ist.Whether the device is Exchange ActiveSync activated.
easDeviceIdeasDeviceId StringString Exchange ActiveSync-ID des Geräts.Exchange ActiveSync Id of the device.
easActivationDateTimeeasActivationDateTime DateTimeOffsetDateTimeOffset Exchange ActivationSync-Aktivierungszeit des Geräts.Exchange ActivationSync activation time of the device.
azureADRegisteredazureADRegistered Boolescher WertBoolean Gibt an, ob das Gerät für Azure Active Directory registriert ist.Whether the device is Azure Active Directory registered.
deviceEnrollmentTypedeviceEnrollmentType deviceEnrollmentTypedeviceEnrollmentType Registrierungstyp des Geräts.Enrollment type of the device. Mögliche Werte: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement.Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement.
activationLockBypassCodeactivationLockBypassCode StringString Code, der ermöglicht, dass die Aktivierungssperre auf einem Gerät umgangen wird.Code that allows the Activation Lock on a device to be bypassed.
emailAddressemailAddress StringString E-Mail(s) für den Benutzer, der dem Gerät zugeordnet istEmail(s) for the user associated with the device
azureADDeviceIdazureADDeviceId StringString Die eindeutige ID für das Azure Active Directory-Gerät.The unique identifier for the Azure Active Directory device. Schreibgeschützt.Read only.
deviceRegistrationStatedeviceRegistrationState deviceRegistrationStatedeviceRegistrationState GeräteregistrierungsstatusDevice registration state. Mögliche Werte: notRegistered, registered, revoked, keyConflict, approvalPending, certificateReset, notRegisteredPendingEnrollment, unknown.Possible values are: notRegistered, registered, revoked, keyConflict, approvalPending, certificateReset, notRegisteredPendingEnrollment, unknown.
deviceCategoryDisplayNamedeviceCategoryDisplayName StringString Anzeigename der GerätekategorieDevice category display name
isSupervisedisSupervised BooleanBoolean Überwachter GerätestatusDevice supervised status
exchangeLastSuccessfulSyncDateTimeexchangeLastSuccessfulSyncDateTime DateTimeOffsetDateTimeOffset Letzter Zeitpunkt, zu dem das Gerät Exchange kontaktiert hat.Last time the device contacted Exchange.
exchangeAccessStateexchangeAccessState deviceManagementExchangeAccessStatedeviceManagementExchangeAccessState Der Zugriffsstatus des Geräts in Exchange.The Access State of the device in Exchange. Mögliche Werte: none, unknown, allowed, blocked, quarantined.Possible values are: none, unknown, allowed, blocked, quarantined.
exchangeAccessStateReasonexchangeAccessStateReason deviceManagementExchangeAccessStateReasondeviceManagementExchangeAccessStateReason Grund für den Zugriffsstatus des Geräts in Exchange.The reason for the device's access state in Exchange. Mögliche Werte sind: none, unknown, exchangeGlobalRule, exchangeIndividualRule, exchangeDeviceRule, exchangeUpgrade, exchangeMailboxPolicy, other, compliant, notCompliant, notEnrolled, unknownLocation, mfaRequired, azureADBlockDueToAccessPolicy, compromisedPassword, deviceNotKnownWithManagedApp.Possible values are: none, unknown, exchangeGlobalRule, exchangeIndividualRule, exchangeDeviceRule, exchangeUpgrade, exchangeMailboxPolicy, other, compliant, notCompliant, notEnrolled, unknownLocation, mfaRequired, azureADBlockDueToAccessPolicy, compromisedPassword, deviceNotKnownWithManagedApp.
remoteAssistanceSessionUrlremoteAssistanceSessionUrl StringString Die URL, die ermöglicht, dass mit dem Gerät eine Remoteunterstützungssitzung eingerichtet wird.Url that allows a Remote Assistance session to be established with the device.
remoteAssistanceSessionErrorDetailsremoteAssistanceSessionErrorDetails StringString Eine Fehlerzeichenfolge, die Probleme beim Erstellen von Objekten für die Remoteunterstützungssitzung identifiziert.An error string that identifies issues when creating Remote Assistance session objects.
isEncryptedisEncrypted BooleanBoolean GeräteverschlüsselungsstatusDevice encryption status
userPrincipalNameuserPrincipalName ZeichenfolgeString Benutzerprinzipalname für das GerätDevice user principal name
modelmodel StringString Das Modell des Geräts.Model of the device
Herstellermanufacturer StringString Hersteller des GerätsManufacturer of the device
imeiimei StringString IMEIIMEI
complianceGracePeriodExpirationDateTimecomplianceGracePeriodExpirationDateTime DateTimeOffsetDateTimeOffset Datum und Uhrzeit des Ablaufs der Karenzzeit für die GerätekonformitätThe DateTime when device compliance grace period expires
serialNumberserialNumber StringString SerialNumberSerialNumber
PhoneNumberphoneNumber StringString Telefonnummer des GerätsPhone number of the device
androidSecurityPatchLevelandroidSecurityPatchLevel StringString Sicherheitspatchlevel von AndroidAndroid security patch level
userDisplayNameuserDisplayName StringString Anzeigename des BenutzersUser display name
configurationManagerClientEnabledFeaturesconfigurationManagerClientEnabledFeatures configurationManagerClientEnabledFeaturesconfigurationManagerClientEnabledFeatures Für ConfigrMgr-Client aktivierte FeaturesConfigrMgr client enabled features
wiFiMacAddresswiFiMacAddress StringString Wi-Fi-MACWi-Fi MAC
deviceHealthAttestationStatedeviceHealthAttestationState deviceHealthAttestationStatedeviceHealthAttestationState Integritätsnachweis für Geräte – StatusThe device health attestation state.
subscriberCarriersubscriberCarrier StringString Netzbetreiber des AbonnentenSubscriber Carrier
meidmeid StringString MEIDMEID
totalStorageSpaceInBytestotalStorageSpaceInBytes Int64Int64 Gesamtspeicher in ByteTotal Storage in Bytes
freeStorageSpaceInBytesfreeStorageSpaceInBytes Int64Int64 Freier Speicher in ByteFree Storage in Bytes
managedDeviceNamemanagedDeviceName StringString Automatisch generierter Name zum Identifizieren eines Geräts.Automatically generated name to identify a device. Kann mit einem Anzeigenamen überschrieben werden.Can be overwritten to a user friendly name.
partnerReportedThreatStatepartnerReportedThreatState managedDevicePartnerReportedHealthStatemanagedDevicePartnerReportedHealthState Gibt den Bedrohungsstatus eines Geräts an, wenn ein vom Konto und Gerät ein Mobile Threat Defense-Partner verwendet wird.Indicates the threat state of a device when a Mobile Threat Defense partner is in use by the account and device. Schreibgeschützt.Read Only. Mögliche Werte: unknown, activated, deactivated, secured, lowSeverity, mediumSeverity, highSeverity, unresponsive, compromised, misconfigured.Possible values are: unknown, activated, deactivated, secured, lowSeverity, mediumSeverity, highSeverity, unresponsive, compromised, misconfigured.

AntwortResponse

Wenn die Methode erfolgreich verläuft, 201 Created werden der Antwortcode und ein managedDevice -Objekt im Antworttext zurückgegeben.If successful, this method returns a 201 Created response code and a managedDevice object in the response body.

BeispielExample

AnforderungRequest

Nachfolgend sehen Sie ein Beispiel der Anforderung.Here is an example of the request.

POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices
Content-type: application/json
Content-length: 4656

{
  "@odata.type": "#microsoft.graph.managedDevice",
  "userId": "User Id value",
  "deviceName": "Device Name value",
  "managedDeviceOwnerType": "company",
  "deviceActionResults": [
    {
      "@odata.type": "microsoft.graph.deviceActionResult",
      "actionName": "Action Name value",
      "actionState": "pending",
      "startDateTime": "2016-12-31T23:58:46.7156189-08:00",
      "lastUpdatedDateTime": "2017-01-01T00:00:56.8321556-08:00"
    }
  ],
  "enrolledDateTime": "2016-12-31T23:59:43.797191-08:00",
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "operatingSystem": "Operating System value",
  "complianceState": "compliant",
  "jailBroken": "Jail Broken value",
  "managementAgent": "mdm",
  "osVersion": "Os Version value",
  "easActivated": true,
  "easDeviceId": "Eas Device Id value",
  "easActivationDateTime": "2016-12-31T23:59:43.4878784-08:00",
  "azureADRegistered": true,
  "deviceEnrollmentType": "userEnrollment",
  "activationLockBypassCode": "Activation Lock Bypass Code value",
  "emailAddress": "Email Address value",
  "azureADDeviceId": "Azure ADDevice Id value",
  "deviceRegistrationState": "registered",
  "deviceCategoryDisplayName": "Device Category Display Name value",
  "isSupervised": true,
  "exchangeLastSuccessfulSyncDateTime": "2017-01-01T00:00:45.8803083-08:00",
  "exchangeAccessState": "unknown",
  "exchangeAccessStateReason": "unknown",
  "remoteAssistanceSessionUrl": "https://example.com/remoteAssistanceSessionUrl/",
  "remoteAssistanceSessionErrorDetails": "Remote Assistance Session Error Details value",
  "isEncrypted": true,
  "userPrincipalName": "User Principal Name value",
  "model": "Model value",
  "manufacturer": "Manufacturer value",
  "imei": "Imei value",
  "complianceGracePeriodExpirationDateTime": "2016-12-31T23:56:44.951111-08:00",
  "serialNumber": "Serial Number value",
  "phoneNumber": "Phone Number value",
  "androidSecurityPatchLevel": "Android Security Patch Level value",
  "userDisplayName": "User Display Name value",
  "configurationManagerClientEnabledFeatures": {
    "@odata.type": "microsoft.graph.configurationManagerClientEnabledFeatures",
    "inventory": true,
    "modernApps": true,
    "resourceAccess": true,
    "deviceConfiguration": true,
    "compliancePolicy": true,
    "windowsUpdateForBusiness": true
  },
  "wiFiMacAddress": "Wi Fi Mac Address value",
  "deviceHealthAttestationState": {
    "@odata.type": "microsoft.graph.deviceHealthAttestationState",
    "lastUpdateDateTime": "Last Update Date Time value",
    "contentNamespaceUrl": "https://example.com/contentNamespaceUrl/",
    "deviceHealthAttestationStatus": "Device Health Attestation Status value",
    "contentVersion": "Content Version value",
    "issuedDateTime": "2016-12-31T23:58:22.1231038-08:00",
    "attestationIdentityKey": "Attestation Identity Key value",
    "resetCount": 10,
    "restartCount": 12,
    "dataExcutionPolicy": "Data Excution Policy value",
    "bitLockerStatus": "Bit Locker Status value",
    "bootManagerVersion": "Boot Manager Version value",
    "codeIntegrityCheckVersion": "Code Integrity Check Version value",
    "secureBoot": "Secure Boot value",
    "bootDebugging": "Boot Debugging value",
    "operatingSystemKernelDebugging": "Operating System Kernel Debugging value",
    "codeIntegrity": "Code Integrity value",
    "testSigning": "Test Signing value",
    "safeMode": "Safe Mode value",
    "windowsPE": "Windows PE value",
    "earlyLaunchAntiMalwareDriverProtection": "Early Launch Anti Malware Driver Protection value",
    "virtualSecureMode": "Virtual Secure Mode value",
    "pcrHashAlgorithm": "Pcr Hash Algorithm value",
    "bootAppSecurityVersion": "Boot App Security Version value",
    "bootManagerSecurityVersion": "Boot Manager Security Version value",
    "tpmVersion": "Tpm Version value",
    "pcr0": "Pcr0 value",
    "secureBootConfigurationPolicyFingerPrint": "Secure Boot Configuration Policy Finger Print value",
    "codeIntegrityPolicy": "Code Integrity Policy value",
    "bootRevisionListInfo": "Boot Revision List Info value",
    "operatingSystemRevListInfo": "Operating System Rev List Info value",
    "healthStatusMismatchInfo": "Health Status Mismatch Info value",
    "healthAttestationSupportedStatus": "Health Attestation Supported Status value"
  },
  "subscriberCarrier": "Subscriber Carrier value",
  "meid": "Meid value",
  "totalStorageSpaceInBytes": 8,
  "freeStorageSpaceInBytes": 7,
  "managedDeviceName": "Managed Device Name value",
  "partnerReportedThreatState": "activated"
}

AntwortResponse

Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.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: 4705

{
  "@odata.type": "#microsoft.graph.managedDevice",
  "id": "705c034c-034c-705c-4c03-5c704c035c70",
  "userId": "User Id value",
  "deviceName": "Device Name value",
  "managedDeviceOwnerType": "company",
  "deviceActionResults": [
    {
      "@odata.type": "microsoft.graph.deviceActionResult",
      "actionName": "Action Name value",
      "actionState": "pending",
      "startDateTime": "2016-12-31T23:58:46.7156189-08:00",
      "lastUpdatedDateTime": "2017-01-01T00:00:56.8321556-08:00"
    }
  ],
  "enrolledDateTime": "2016-12-31T23:59:43.797191-08:00",
  "lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
  "operatingSystem": "Operating System value",
  "complianceState": "compliant",
  "jailBroken": "Jail Broken value",
  "managementAgent": "mdm",
  "osVersion": "Os Version value",
  "easActivated": true,
  "easDeviceId": "Eas Device Id value",
  "easActivationDateTime": "2016-12-31T23:59:43.4878784-08:00",
  "azureADRegistered": true,
  "deviceEnrollmentType": "userEnrollment",
  "activationLockBypassCode": "Activation Lock Bypass Code value",
  "emailAddress": "Email Address value",
  "azureADDeviceId": "Azure ADDevice Id value",
  "deviceRegistrationState": "registered",
  "deviceCategoryDisplayName": "Device Category Display Name value",
  "isSupervised": true,
  "exchangeLastSuccessfulSyncDateTime": "2017-01-01T00:00:45.8803083-08:00",
  "exchangeAccessState": "unknown",
  "exchangeAccessStateReason": "unknown",
  "remoteAssistanceSessionUrl": "https://example.com/remoteAssistanceSessionUrl/",
  "remoteAssistanceSessionErrorDetails": "Remote Assistance Session Error Details value",
  "isEncrypted": true,
  "userPrincipalName": "User Principal Name value",
  "model": "Model value",
  "manufacturer": "Manufacturer value",
  "imei": "Imei value",
  "complianceGracePeriodExpirationDateTime": "2016-12-31T23:56:44.951111-08:00",
  "serialNumber": "Serial Number value",
  "phoneNumber": "Phone Number value",
  "androidSecurityPatchLevel": "Android Security Patch Level value",
  "userDisplayName": "User Display Name value",
  "configurationManagerClientEnabledFeatures": {
    "@odata.type": "microsoft.graph.configurationManagerClientEnabledFeatures",
    "inventory": true,
    "modernApps": true,
    "resourceAccess": true,
    "deviceConfiguration": true,
    "compliancePolicy": true,
    "windowsUpdateForBusiness": true
  },
  "wiFiMacAddress": "Wi Fi Mac Address value",
  "deviceHealthAttestationState": {
    "@odata.type": "microsoft.graph.deviceHealthAttestationState",
    "lastUpdateDateTime": "Last Update Date Time value",
    "contentNamespaceUrl": "https://example.com/contentNamespaceUrl/",
    "deviceHealthAttestationStatus": "Device Health Attestation Status value",
    "contentVersion": "Content Version value",
    "issuedDateTime": "2016-12-31T23:58:22.1231038-08:00",
    "attestationIdentityKey": "Attestation Identity Key value",
    "resetCount": 10,
    "restartCount": 12,
    "dataExcutionPolicy": "Data Excution Policy value",
    "bitLockerStatus": "Bit Locker Status value",
    "bootManagerVersion": "Boot Manager Version value",
    "codeIntegrityCheckVersion": "Code Integrity Check Version value",
    "secureBoot": "Secure Boot value",
    "bootDebugging": "Boot Debugging value",
    "operatingSystemKernelDebugging": "Operating System Kernel Debugging value",
    "codeIntegrity": "Code Integrity value",
    "testSigning": "Test Signing value",
    "safeMode": "Safe Mode value",
    "windowsPE": "Windows PE value",
    "earlyLaunchAntiMalwareDriverProtection": "Early Launch Anti Malware Driver Protection value",
    "virtualSecureMode": "Virtual Secure Mode value",
    "pcrHashAlgorithm": "Pcr Hash Algorithm value",
    "bootAppSecurityVersion": "Boot App Security Version value",
    "bootManagerSecurityVersion": "Boot Manager Security Version value",
    "tpmVersion": "Tpm Version value",
    "pcr0": "Pcr0 value",
    "secureBootConfigurationPolicyFingerPrint": "Secure Boot Configuration Policy Finger Print value",
    "codeIntegrityPolicy": "Code Integrity Policy value",
    "bootRevisionListInfo": "Boot Revision List Info value",
    "operatingSystemRevListInfo": "Operating System Rev List Info value",
    "healthStatusMismatchInfo": "Health Status Mismatch Info value",
    "healthAttestationSupportedStatus": "Health Attestation Supported Status value"
  },
  "subscriberCarrier": "Subscriber Carrier value",
  "meid": "Meid value",
  "totalStorageSpaceInBytes": 8,
  "freeStorageSpaceInBytes": 7,
  "managedDeviceName": "Managed Device Name value",
  "partnerReportedThreatState": "activated"
}