microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
703 stars 168 forks source link

Get-MgDeviceManagementManagedDevice returns only 948 devices #1819

Closed ozboz89 closed 1 year ago

ozboz89 commented 1 year ago

Using either the SDK or API I do not find a way to get more results.

Get-MgDeviceManagementManagedDevice -All I only get 948 results, changing pagesize has no change

$allmanaged = Get-MgDeviceManagementManagedDevice -All

$allmanaged.Count 949

if I use the API I do not get '@odata.nextlink'

$reportJson2 = Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/deviceManagement/manageddevices?$select=deviceName" -Method GET

$reportJson2

Name Value


@odata.context https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices @odata.count 949 value {System.Collections.Hashtable, System.Collections.Hashtable, System.Collections.Hashtable, System.Collections.Hashtable...}

peombwa commented 1 year ago

@ozboz89, unfortunately this is an issue with the API. The API does not return a @odata.nextlink, which is used to page through responses.

Please open a feature request/question at https://developer.microsoft.com/en-us/graph/support as this is a service issue.

As this repository is intended for issues related to the functionality of the module, we may not be the best place to answer some queries that are tied to the functionality of the API.