Devices assigned to specific user – Intune GraphAPI

Devices assigned to specific user – Intune GraphAPI
Request Format: Creating a request to the API involves specifying the user's ID or user principal name. This straightforward GET request to /managedDevices returns a collection of devices assigned to the user.

https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?Sfilter=contains(userPrincpalName, ‘test@domain.com’)

Powershell queries

connect -MSGraph
set-IntuneManagedDevice | Get-MSGraphAllPages | Where-Object {$_.userPrincipalName -match
“test@domain. com}

jet-IntuneManagedDevice | Where-Object {$_.devicellame -eq “”}
Remove-IntunemanagedDevice -manageddeviceID “”

We will be happy to hear your thoughts

Leave a reply

TechEggs
Logo