Calling Get-AzureADDevice
gets me three attributes. How can I get the full list of attributes for the object? Specifically, when I use the GraphApi:
https://graph.microsoft.com/v1.0/devices?$filter=startswith(operatingSystem,'Windows')`
How can I achieve the same thing in Powershell?
$aadDevices = Get-AzureADDevice -All 1
gets me the object ID, DeviceID and display name. So a filter clause on operatingSystem excepts.
What I am looking for is a list of all the computer objects in AzureAD so that I can do some automated processing.
You need to use the -Filter "startswith(DeviceOSType,'Windows')"
, try the command as below.
Get-AzureADDevice -All 1 -Filter "startswith(DeviceOSType,'Windows')"
My test sample:
Get-AzureADDevice -All 0 -Top 5 -Filter "startswith(DeviceOSType,'Windows')" | ConvertTo-Json