Mar 16 2022 10:57 AM
Invoke-MSGraphRequest -Url 'https://graph.microsoft.com/beta/deviceManagement/managedDevices?$select=id,imei,operatingSystem,ownerType,managedDeviceOwnerType&$filter=(operatingSystem eq ''iOS'')' -HttpMethod GET
I would like to retrieve this data and the URL works in Postman, but when I run it in VS i get "Cannot validate argument on parameter 'Url'. The provided URL is not valid - the URL may be a relative URL" Any ideas on how I can retrieve this data and use it? Mainly make this request work with Connect-MSGraph
Mar 16 2022 06:07 PM
Mar 17 2022 02:44 AM
@Moe_Kinani You could also store the output from https://graph.microsoft.com/beta/deviceManagement/managedDevices in a variable and query from there?
$devices=https://graph.microsoft.com/beta/deviceManagement/managedDevices
$devices.value | Where-Object operatingSystem -Contains 'iOS'
Mar 23 2022 02:29 AM - edited Mar 28 2022 12:13 PM
Did you manage to get a report?