Create enrollmentTroubleshootingEvent

Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Create a new enrollmentTroubleshootingEvent object.

Prerequisites

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) DeviceManagementManagedDevices.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP Request

POST /deviceManagement/troubleshootingEvents

Request headers

Header Value
Authorization Bearer <token> Required.
Accept application/json

Request body

In the request body, supply a JSON representation for the enrollmentTroubleshootingEvent object.

The following table shows the properties that are required when you create the enrollmentTroubleshootingEvent.

Property Type Description
id String UUID for the object Inherited from deviceManagementTroubleshootingEvent
eventDateTime DateTimeOffset Time when the event occurred . Inherited from deviceManagementTroubleshootingEvent
correlationId String Id used for tracing the failure in the service. Inherited from deviceManagementTroubleshootingEvent
managedDeviceIdentifier String Device identifier created or collected by Intune.
operatingSystem String Operating System.
osVersion String OS Version.
userId String Identifier for the user that tried to enroll the device.
deviceId String Azure AD device identifier.
enrollmentType deviceEnrollmentType Type of the enrollment. Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement.
failureCategory deviceEnrollmentFailureReason Highlevel failure category. Possible values are: unknown, authentication, authorization, accountValidation, userValidation, deviceNotSupported, inMaintenance, badRequest, featureNotSupported, enrollmentRestrictionsEnforced, clientDisconnected, userAbandonment.
failureReason String Detailed failure reason.

Response

If successful, this method returns a 201 Created response code and a enrollmentTroubleshootingEvent object in the response body.

Example

Request

Here is an example of the request.

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

{
  "@odata.type": "#microsoft.graph.enrollmentTroubleshootingEvent",
  "eventDateTime": "2016-12-31T23:59:23.3984029-08:00",
  "correlationId": "Correlation Id value",
  "managedDeviceIdentifier": "Managed Device Identifier value",
  "operatingSystem": "Operating System value",
  "osVersion": "Os Version value",
  "userId": "User Id value",
  "deviceId": "Device Id value",
  "enrollmentType": "userEnrollment",
  "failureCategory": "authentication",
  "failureReason": "Failure Reason 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 201 Created
Content-Type: application/json
Content-Length: 558

{
  "@odata.type": "#microsoft.graph.enrollmentTroubleshootingEvent",
  "id": "c4a623f5-23f5-c4a6-f523-a6c4f523a6c4",
  "eventDateTime": "2016-12-31T23:59:23.3984029-08:00",
  "correlationId": "Correlation Id value",
  "managedDeviceIdentifier": "Managed Device Identifier value",
  "operatingSystem": "Operating System value",
  "osVersion": "Os Version value",
  "userId": "User Id value",
  "deviceId": "Device Id value",
  "enrollmentType": "userEnrollment",
  "failureCategory": "authentication",
  "failureReason": "Failure Reason value"
}