msgraph-beta-sdk-dotnet icon indicating copy to clipboard operation
msgraph-beta-sdk-dotnet copied to clipboard

Orderby probably does not work in DeviceManagement.Reports.GetDeviceInstallStatusReport

Open tkachuk2222 opened this issue 2 years ago • 7 comments

I am sending requests to get all install status reports using the code below. But when I am using pagination, because I can't get all items in one response (rows total number is ~5000. it gives 50 items per page, so skip parameter every time increased ), orderby looks like works in the wrong way. As a result on different pages, I can find the same item that was on the first page. But the same items I can see after a new graph client was created. So I am worried about the possibility to miss an item

var deviceInstallStatusResponse = await graphClient.DeviceManagement.Reports.GetDeviceInstallStatusReport.PostAsync( new GetDeviceInstallStatusReportPostRequestBody() { Filter = $"(ApplicationId eq '{id}')", OrderBy = new List<string>() { "DeviceId", "ApplicationId", "UserId", "DeviceName", "UserPrincipalName", "UserName", "Platform" }, Skip = skip, Top = 10000 } , cancellationToken: CancellationToken.None);

I am using NuGet Microsoft.Graph.Beta 5.34.0-preview

tkachuk2222 avatar Jun 27 '23 12:06 tkachuk2222

Any chance we can close this @tkachuk2222 after the resolution of https://github.com/microsoftgraph/msgraph-beta-sdk-dotnet/issues/681

andrueastman avatar Jul 13 '23 09:07 andrueastman

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Any chance we can close this @tkachuk2222 after the resolution of #681

could you please let me know the PageIterator types (TEntity, TCollectionPage) should be used for the GetDeviceInstallStatusReport request? I can not find it in the documentation

tkachuk2222 avatar Jul 17 '23 09:07 tkachuk2222

Thanks for following up @tkachuk2222

Any chance you can share the link to the API documentation you are using to call /deviceManagement/reports/getDeviceInstallStatusReport to help us understand this better? As the current return type for this API seems to be a stream and not a collection page with entities, you may not be able to use the pageIterator with it as it is.

andrueastman avatar Jul 18 '23 06:07 andrueastman

deviceManagement

unfortunately I can no longer find it in the documentation and on the https://developer.microsoft.com/en-us/graph/graph-explorer as well

tkachuk2222 avatar Jul 18 '23 11:07 tkachuk2222

As the APIs on beta tend to change and get removed, any chance that calling this API still works for you?

andrueastman avatar Jul 20 '23 10:07 andrueastman

As the APIs on beta tend to change and get removed, any chance that calling this API still works for you?

Yes, it works for me

tkachuk2222 avatar Jul 20 '23 10:07 tkachuk2222