Report AAD Users together with their Registered Device

Copper Contributor

Hi Guys

Need assistance to get a report of Azure AD users together with their registered device name, I`m trying the following command but I`m not getting the correct results:


Foreach User in “Get-ADUser -All” {

              UserCreds = Get-AzureADUserRegisteredDevice -ObjectId $User              


10 Replies

This has been answered several times already, do a search next time :)


Get-AzureADUser | % {$DeviceOwner = $_.UserPrincipalName; Get-AzureADUserRegisteredDevice -ObjectId $_.ObjectId } | select @{n="DeviceOwner";e={$DeviceOwner}},DisplayName,DeviceOSType,ApproximateLastLogonTimeStamp

@Vasil Michev thanks for the script and I did try it but it doesn`t bring the results, please see attached screenshot. 



Try using an account that has sufficient permissions to enumerate users in the directory as well as call the Get-AzureADUserRegisteredDevice cmdlet.

@Simphiwe_Mkhize01  Hello! You've posted your question in the Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Azure Active Directory space - please post Azure Active Directory questions here in the future. 

@Eric Starker thank you for your assistance.

@Vasil Michev will try that and give feedback.

@Vasil Michev This returns value with single user. Please suggest query with same results for all users.

You should do 'Get-AzureADUser -all $true'


You can use GUI mode (Azure Portal) to get the report with details.

Login to Azure portal>> Devices>>All Devices

Hope this will help you

Long term approach:

You use Intune Data warehouse reporting to have insight on your environment.