Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orderby probably does not work in DeviceManagement.Reports.GetDeviceInstallStatusReport #683

Open
tkachuk2222 opened this issue Jun 27, 2023 · 7 comments
Labels
Bug: metadata Question: SDK Not actionable. Question related to the SDK. Status: Needs investigation

Comments

@tkachuk2222
Copy link

tkachuk2222 commented Jun 27, 2023

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

@ghost ghost added the Needs: Triage label Jun 27, 2023
@andrueastman
Copy link
Member

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

@microsoft-github-policy-service
Copy link
Contributor

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.

@tkachuk2222
Copy link
Author

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

@andrueastman
Copy link
Member

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.

@tkachuk2222
Copy link
Author

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

@andrueastman
Copy link
Member

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

@tkachuk2222
Copy link
Author

tkachuk2222 commented Jul 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: metadata Question: SDK Not actionable. Question related to the SDK. Status: Needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants