Skip value not taken into consideration for Cloud Apps API

Dev Parmar 20 Reputation points
2025-05-07T11:29:21.8666667+00:00

Hi Team,
I am using POST endpoint for getting all the alerts that are present in defender for cloud apps. In our instance we have roughly around 6600 alerts and if I increase the skip value to 9000, the API is duplicating the records of last page and is not taking the skip value into consideration. Can anyone please help us on this? Below is URL and request body that I am using to make API call.

URL - https://<instance>.portal.cloudappsecurity.com/api/v1/alerts

Request Body -

{
    "filters": {
        "date": {
            "range": {
                "start": 1715061904343,
                "end": 1746597396008
            }
        }
    },
    "skip": 9000,
    "limit": 100
}
Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud Apps
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pauline Mbabu 1,320 Reputation points Microsoft Employee
    2025-05-22T16:52:36.2766667+00:00

    Hello @dev parmar ,
    Based on my research the issue you are encountering might be because the backend may not support deep pagination reliably using skip alone. Suggested work arounds for this are to try using Paginating in smaller chunks, you can also try using Graph Api Instead to fetch the alerts then use the **nextLink **Instead of skip for Pagination. https://learn.microsoft.com/en-us/graph/api/security-list-alerts_v2?view=graph-rest-1.0&tabs=http

    If this doesn't work, please get in touch with support. Refer to the below link to contact support: https://learn.microsoft.com/en-us/defender-cloud-apps/support-and-ts#open-a-service-request

    If you find the information above helpful, please Click Accept. This will assist others in the community who encounter a similar issue, enabling them to quickly find the solution and benefit from the guidance provided.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.