SC-200 · Question #358
You have a Microsoft 365 E5 subscription. You have a PowerShell script that queries the unified audit log. You discover that the query returns only the first page of results due to server-side…
The correct answer is C. @odata.nextLink. To retrieve all results from a paged query against the unified audit log in PowerShell, you must query the @odata.nextLink property.
Question
You have a Microsoft 365 E5 subscription. You have a PowerShell script that queries the unified audit log. You discover that the query returns only the first page of results due to server-side paging. You need to ensure that you get all the results. Which property should you query in the results?
Options
- A@odata.context
- B@odata.count
- C@odata.nextLink
- D@odata.deltaLink
How the community answered
(50 responses)- A6% (3)
- B18% (9)
- C72% (36)
- D4% (2)
Why each option
To retrieve all results from a paged query against the unified audit log in PowerShell, you must query the `@odata.nextLink` property.
`@odata.context` provides metadata about the OData service but does not facilitate navigation to subsequent pages of results.
`@odata.count` indicates the total number of items available, but it does not provide the mechanism to fetch the actual paged data.
The `@odata.nextLink` property provides a URL to the next page of results in paged API responses, and iterating through these links is the standard method for a PowerShell script to retrieve all data from the unified audit log beyond the initial page.
`@odata.deltaLink` is used for delta queries to track changes over time, not for fetching the next page of a current, initial query result set.
Concept tested: Microsoft Graph API paging (@odata.nextLink)
Source: learn.microsoft.com/graph/paging
Community Discussion
No community discussion yet for this question.