Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
44 lines (33 sloc) 1.08 KB
Function Get-MSGraphIntuneUserDevice {
This function is used to get an AAD User Devices from the Graph API REST interface
The function connects to the Graph API Interface and gets a users devices registered with Intune MDM
Created based on examples from
Get-MSGraphIntuneUserDevice -UserID $UserID
Returns all user devices registered in Intune MDM
NAME: Get-MSGraphIntuneUserDevice
[Parameter(Mandatory = $true, HelpMessage = "UserID (guid) for the user you want to take action on must be specified:")]
# Defining Variables
$graphApiVersion = "beta"
$Resource = "users/$UserID/managedDevices"
try {
$uri = "$graphApiVersion/$($Resource)"
Write-Verbose $uri
(Invoke-RestMethod -Uri $uri -Headers $AuthenticationToken -Method Get -ErrorAction Stop).Value
catch {
throw $_.Exception.Message