Forum Discussion
'$skiptoken' limit error for Microsoft Exchange online Reporting web service API
I was working on integrating MessageTrace report API as a part of my SIEM integration:
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace[?ODATA%20options]
I have noticed that, whenever my $skiptoken reaches the limit 999999 , it throws the following error with 500 status code:
{
"odata.error": {
"code": "UnknownError",
"message": {
"lang": "",
"value": "An error has occurred on the server."
}
}
}
It was working fine for the 999998 value, but wasn't for the $skiptoken value 999999.
Is there any limitations on $skiptoken value from the API itself?
Also, need information, if $skiptoken value 999999 exists, for example,
"odata.nextLink": "../../reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate%20eq%20DateTime'2024-12-02T00%3A00%3A00Z'%20and%20EndDate%20eq%20DateTime'2024-12-02T23%3A59%3A59Z'&$skiptoken=999999"
then how can we request the data from next set of events?
Can someone let me know, is there any max limit from Microsoft API side or for the $skiptoken?
It seems you encountered a limitation with the $skiptoken value in the MessageTrace report API, please referring below:
- Is there a maximum limit for $skiptoken from the API side? Yes, there is a limit on the $skiptoken value, and it appears that 999999 is beyond this limit for the MessageTrace report API.
- How to request the next set of events if $skiptoken 999999 exists? If there is an odata.nextLink provided, you can use that link to request the next set of events. The odata.nextLink contains the URL with the necessary parameters to fetch the next page of results.
GET https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate%20eq%20DateTime'2024-12-02T00:00:00Z'%20and%20EndDate%20eq%20DateTime'2024-12-02T23:59:59Z'&$skiptoken=999999
2 Replies
- swarada-jalukarCopper Contributor
Kidd_Ip can you please help here?
It seems you encountered a limitation with the $skiptoken value in the MessageTrace report API, please referring below:
- Is there a maximum limit for $skiptoken from the API side? Yes, there is a limit on the $skiptoken value, and it appears that 999999 is beyond this limit for the MessageTrace report API.
- How to request the next set of events if $skiptoken 999999 exists? If there is an odata.nextLink provided, you can use that link to request the next set of events. The odata.nextLink contains the URL with the necessary parameters to fetch the next page of results.
GET https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$filter=StartDate%20eq%20DateTime'2024-12-02T00:00:00Z'%20and%20EndDate%20eq%20DateTime'2024-12-02T23:59:59Z'&$skiptoken=999999