Update managedDevice
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a managedDevice 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
PATCH /users/{usersId}/managedDevices/{managedDeviceId}
PATCH /deviceManagement/managedDevices/{managedDeviceId}
PATCH /deviceManagement/detectedApps/{detectedAppId}/managedDevices/{managedDeviceId}
Request headers
Header | Value |
---|---|
Authorization | Bearer <token> Required. |
Accept | application/json |
Request body
In the request body, supply a JSON representation for the managedDevice object.
The following table shows the properties that are required when you create the managedDevice.
Property | Type | Description |
---|---|---|
id | String | Unique Identifier for the device |
userId | String | Unique Identifier for the user associated with the device |
deviceName | String | Name of the device |
managedDeviceOwnerType | managedDeviceOwnerType | Ownership of the device. Can be 'company' or 'personal'. Possible values are: unknown , company , personal . |
deviceActionResults | deviceActionResult collection | List of ComplexType deviceActionResult objects. |
enrolledDateTime | DateTimeOffset | Enrollment time of the device. |
lastSyncDateTime | DateTimeOffset | The date and time that the device last completed a successful sync with Intune. |
operatingSystem | String | Operating system of the device. Windows, iOS, etc. |
complianceState | complianceState | Compliance state of the device. Possible values are: unknown , compliant , noncompliant , conflict , error , inGracePeriod , configManager . |
jailBroken | String | whether the device is jail broken or rooted. |
managementAgent | managementAgentType | Management channel of the device. Intune, EAS, etc. Possible values are: eas , mdm , easMdm , intuneClient , easIntuneClient , configurationManagerClient , configurationManagerClientMdm , configurationManagerClientMdmEas , unknown , jamf , googleCloudDevicePolicyController . |
osVersion | String | Operating system version of the device. |
easActivated | Boolean | Whether the device is Exchange ActiveSync activated. |
easDeviceId | String | Exchange ActiveSync Id of the device. |
easActivationDateTime | DateTimeOffset | Exchange ActivationSync activation time of the device. |
azureADRegistered | Boolean | Whether the device is Azure Active Directory registered. |
deviceEnrollmentType | deviceEnrollmentType | Enrollment type of the device. Possible values are: unknown , userEnrollment , deviceEnrollmentManager , appleBulkWithUser , appleBulkWithoutUser , windowsAzureADJoin , windowsBulkUserless , windowsAutoEnrollment , windowsBulkAzureDomainJoin , windowsCoManagement . |
activationLockBypassCode | String | Code that allows the Activation Lock on a device to be bypassed. |
emailAddress | String | Email(s) for the user associated with the device |
azureADDeviceId | String | The unique identifier for the Azure Active Directory device. Read only. |
deviceRegistrationState | deviceRegistrationState | Device registration state. Possible values are: notRegistered , registered , revoked , keyConflict , approvalPending , certificateReset , notRegisteredPendingEnrollment , unknown . |
deviceCategoryDisplayName | String | Device category display name |
isSupervised | Boolean | Device supervised status |
exchangeLastSuccessfulSyncDateTime | DateTimeOffset | Last time the device contacted Exchange. |
exchangeAccessState | deviceManagementExchangeAccessState | The Access State of the device in Exchange. Possible values are: none , unknown , allowed , blocked , quarantined . |
exchangeAccessStateReason | deviceManagementExchangeAccessStateReason | The reason for the device's access state in Exchange. Possible values are: none , unknown , exchangeGlobalRule , exchangeIndividualRule , exchangeDeviceRule , exchangeUpgrade , exchangeMailboxPolicy , other , compliant , notCompliant , notEnrolled , unknownLocation , mfaRequired , azureADBlockDueToAccessPolicy , compromisedPassword , deviceNotKnownWithManagedApp . |
remoteAssistanceSessionUrl | String | Url that allows a Remote Assistance session to be established with the device. |
remoteAssistanceSessionErrorDetails | String | An error string that identifies issues when creating Remote Assistance session objects. |
isEncrypted | Boolean | Device encryption status |
userPrincipalName | String | Device user principal name |
model | String | Model of the device |
manufacturer | String | Manufacturer of the device |
imei | String | IMEI |
complianceGracePeriodExpirationDateTime | DateTimeOffset | The DateTime when device compliance grace period expires |
serialNumber | String | SerialNumber |
phoneNumber | String | Phone number of the device |
androidSecurityPatchLevel | String | Android security patch level |
userDisplayName | String | User display name |
configurationManagerClientEnabledFeatures | configurationManagerClientEnabledFeatures | ConfigrMgr client enabled features |
wiFiMacAddress | String | Wi-Fi MAC |
deviceHealthAttestationState | deviceHealthAttestationState | The device health attestation state. |
subscriberCarrier | String | Subscriber Carrier |
meid | String | MEID |
totalStorageSpaceInBytes | Int64 | Total Storage in Bytes |
freeStorageSpaceInBytes | Int64 | Free Storage in Bytes |
managedDeviceName | String | Automatically generated name to identify a device. Can be overwritten to a user friendly name. |
partnerReportedThreatState | managedDevicePartnerReportedHealthState | Indicates the threat state of a device when a Mobile Threat Defense partner is in use by the account and device. Read Only. Possible values are: unknown , activated , deactivated , secured , lowSeverity , mediumSeverity , highSeverity , unresponsive , compromised , misconfigured . |
Response
If successful, this method returns a 200 OK
response code and an updated managedDevice object in the response body.
Example
Request
Here is an example of the request.
PATCH https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}
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"
}
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: 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"
}
Feedback
Loading feedback...