May 27 2019 06:28 AM
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
}
May 27 2019 09:35 AM
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
May 27 2019 11:19 PM
@Vasil Michev thanks for the script and I did try it but it doesn`t bring the results, please see attached screenshot.
May 28 2019 08:55 AM
Try using an account that has sufficient permissions to enumerate users in the directory as well as call the Get-AzureADUserRegisteredDevice cmdlet.
May 28 2019 10:17 AM
@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.
May 28 2019 10:36 AM
@Eric Starker thank you for your assistance.
May 28 2019 10:37 AM
@Vasil Michev will try that and give feedback.
Jan 28 2020 04:23 AM
@Vasil Michev This returns value with single user. Please suggest query with same results for all users.
Jan 28 2020 01:24 PM
Feb 01 2020 05:53 AM
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
Feb 01 2020 08:33 AM
Apr 18 2023 05:22 AM
Try using our PowerShell script now to export report on Azure AD devices with the users and other attributes. Get to know more about Azure AD devices and how to generate reports on them from here.
https://o365reports.com/2023/04/18/get-azure-ad-devices-report-using-powershell/