Skip to content

Security alerts_v2 / incidents: $top suppresses @odata.nextLink - #10070

Open
> 𝙰𝚕𝚎𝚓𝚊𝚗𝚍𝚛𝚘 𝙰𝚗𝚍𝚛𝚎𝚞 (4leX-42) wants to merge 2 commits into
microsoftgraph:mainfrom
4leX-42:security-top-pagination-note
Open

> 𝙰𝚕𝚎𝚓𝚊𝚗𝚍𝚛𝚘 𝙰𝚗𝚍𝚛𝚎𝚞 (4leX-42) wants to merge 2 commits into
microsoftgraph:mainfrom
4leX-42:security-top-pagination-note

Conversation

@4leX-42

The list pages for alerts_v2 and incidents say to page with @odata.nextLink, but when $top is present the response never includes it, so clients that combine $top with nextLink paging silently stop after the first page.

Observed against a production tenant (v1.0 and beta):

  • Without $top, the first page returns 2000 alerts / 50 incidents and includes @odata.nextLink.
  • incidents?$top=5&$count=true returns 5 items and @odata.count = 2266, with no nextLink.
  • $top=5 followed by $top=5&$skip=5 returns exactly the same items as $top=10.
  • $top=100 on incidents returns 400 The limit of '50' for Top query has been exceeded; $top=2500 on alerts returns the same error with a limit of 2000.

This adds one sentence to the pagination guidance on the four pages (v1.0 and beta) explaining the behaviour, the $skip alternative and the maximum $top value.

@4leX-42

@microsoft-github-policy-service agree

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5966947:

✅ Validation status: passed

File Status Preview URL Details
api-reference/beta/api/security-list-alerts_v2.md ✅Succeeded
api-reference/beta/api/security-list-incidents.md ✅Succeeded
api-reference/v1.0/api/security-list-alerts_v2.md ✅Succeeded
api-reference/v1.0/api/security-list-incidents.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 2170383:

✅ Validation status: passed

File Status Preview URL Details
api-reference/beta/api/security-list-alerts_v2.md ✅Succeeded
api-reference/beta/api/security-list-incidents.md ✅Succeeded
api-reference/v1.0/api/security-list-alerts_v2.md ✅Succeeded
api-reference/v1.0/api/security-list-incidents.md ✅Succeeded

For more details, please refer to the build report.

@4leX-42

Hi, could someone approve the workflow runs and take a look when you have a moment? The previous ones expired waiting for approval, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant