When retrieving list email message via delta
"https://graph.microsoft.com/v1.0/users/#{upn}/mailFolders/#{mailFolderId}/messages/delta?$select=id"
we noticed that the items that being returned is limited to 5000 records only. Even though we have more that 5000 records, the delta always stop giving next url link at that point, and gave us the next delta link.
So, i make some experiments and notice few things
- When the API request hit from some specific region, it behave differently. In our case, my server is in London region, we hit the API it return 5000 records only. So i tried use the same access token and hit it in different region (SG) it works fine and returning all records. The code, the initial delta link and environment are the same between two different region
- We are not using filter, so https://learn.microsoft.com/en-us/graph/delta-query-messages?#use-query-parameters-in-a-delta-query-for-messages its not relevant with our cases
- I notice the format of next link url returned from API itself is different. From problematic region, it will return https://graph.microsoft.com/v1.0/users/#{upn}/mailFolders('mailFolderId')/messages/delta?$select=id$skipToken='adsadsadada'. And in non problemation region it will return the same format as initial delta link which is https://graph.microsoft.com/v1.0/users/#{upn}/mailFolders/#{mailFolderId}/messages/delta?$select=id$skipToken='adsadasdasdada'
Please help me to sort it out this issue, because it seems the delta API is not reliable