0
votes

I get a 410 when syncing messages:

{\"code\":\"SyncStateNotFound\",\"message\":\"The sync state 
generation is not found; generation=1;[highest=4][4][2][3].\"}

This only occurs when syncing messages for select mailfolders on select accounts. It occurs when making a post-initial sync using the relevant delta token. I can recreate this via making

GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages/?$deltaToken={delta_token}

In Microsoft's Outlook Sandbox.

Here are the literal steps it takes to reproduce deterministically:

1) Initial Message Sync:

GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages

2) Sync with initial delta token:

GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages/?$deltaToken={delta_token}

3) Sync with skip token until delta token:

GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages/?$skipToken={skip_token}

4) ERROR OCCURS HERE: Mailfolder receives update, so I re-sync messages with delta token from (3). The call below throws a 410 and I can't sync messages.

GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages/?$deltaToken={delta_token}

To reiterate: I've isolated this to just testing in the Outlook sandbox, and it still occurs. Testing as in making the GET call to sync (i.e., make perform (2)) using the deltaToken from (3) and its corresponding folderId as query parameters.

1
You should provide code samples and any other relevant details.RasmusW
@RasmusW FYI In making said API call to sync messages, I use the deltaToken provide by the initial sync call (GET https://outlook.office365.com/api/v2.0/me/MailFolders('{folder_id}')/messages)Benson Wally Tran
this is weird, I started getting the same error, but I can not reproduce it, whatever delta token I pass I always get 200, but different body, based on token.Igor G.

1 Answers

0
votes

Dumb Mistake: Passed in initial delta token as opposed to current.