Forum Discussion
Report AAD Users together with their Registered Device
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
- Moe_KinaniBronze ContributorLong term approach:
You use Intune Data warehouse reporting to have insight on your environment.
https://docs.microsoft.com/en-us/intune/developer/reports-nav-create-intune-reports
Moe - IT_Expert_GuruCopper Contributor
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
- EricStarkerGold Contributor
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.
- Simphiwe_Mkhize01Copper Contributor
EricStarker thank you for your assistance.
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
- singhRaghvendra95Copper Contributor
VasilMichev This returns value with single user. Please suggest query with same results for all users.
- Thijs LecomteBronze ContributorYou should do 'Get-AzureADUser -all $true'
- Simphiwe_Mkhize01Copper Contributor
VasilMichev 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.