utilizing a deviceId that I am retrieving from this endpoint /users/{userId}/registeredDevices, which means it is in Intune.
Your assumption above is incorrect. Even though the device object does exist in Intune, the deviceId
value will differ between the two directories and you cannot use it directly. You can however filter on it, by leveraging the azureADDeviceId
query:
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=azureADDeviceId eq 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx'