How to get Intune Device ID with Graph

Copper Contributor

Hi all

I'm looking for a solution on how to get a Intune Device ID of an enrolled device.


What I need:

Send some commands to manage devices using Graph, based on the Owner or PrimaryUser of a given device, for example:



This call would reboot the device. Notice that I need to have the managedDeviceId, which is the "Intune Device ID"


The challenge is, how to get this Intune Device ID based on the device PrimaryUser or Device Owner using Graph?


I've already tried the GET{user}/ownedDevices - it doesn't help me because It will retrieve the the Object and Device ID not the Intune Device ID.


Any suggestion is appreciated 



1 Reply
You can do it the other way around - once you have the DeviceId from Azure AD, you can filter by its value via the azureADDeviceId property on the managedDevice object:

GET$filter=azureADDeviceId eq '05ab7c00-1111-2222-3333-ef539bf2a27b'