Forum Discussion
Azure AD Data Extract
Hi Faiza!
You probably need to use a combination of cmdlets to get that data.
#Get All Devices
$devices = Get-AzureADDevice -All $true
For each device you can use Get-AzureADDeviceRegisteredUser or Get-AzureADDeviceRegisteredOwner to get the person associated with it.
- Faiza QadriApr 23, 2019Iron Contributor
joshuatoonGood to hear from you!
I'm running the Get-AzureADDevice -all but only get the ObjectID, DeviceID, Displayname
in the Azure portal under Azure Active Directory - Devices I can see the following:
- SamiLamppuApr 23, 2019Brass Contributor
Faiza Qadri as Joshua wrote combination of cmdlets should work in your case (Get-AzureADDevice, Get-AzureADDeviceRegisteredOwner).
Another alternative is to use old cmdlet which still works:
get-msoldevice -All -ReturnRegisteredOwners | ft DisplayName,Enabled,DeviceOsType,DeviceTrustType,DeviceTrustLevel,RegisteredOwners,ApproximateLastLogonTimestamp
But this doesn't return the compliant information. One method to list compliant status could be to list all devices via Graph API (https://developer.microsoft.com/en-us/graph/graph-explorer#:
GET https://graph.microsoft.com/v1.0/devices