question

DanieleMorelli-2596 avatar image
0 Votes"
DanieleMorelli-2596 asked DanieleMorelli-2596 answered

task id mismatch between creation and delta retrieval

When a task is created on our proprietary software, a POST call is made towards MS Graph API (/me/outlook/tasks) to notify the creation of the task. The response of that call contains an 'id' field that looks like:

AAkALgAAAAAZHYQDEapmEc2byACqAC-EXg0AjUykAOuej0abumLgqAy5nwAACYgdBgAA

... and that we save in our DB.
When I ask for changes in the user's todo list (/me/todo/lists/<list_id>/tasks/delta?startDateTime=<start_date>&endDateTime=<end_date>), I may see the exact same task being returned, but now the ID looks something like:

AAMkADc1ZFVhYjdiLWQ4OTQtNGJlNi05NzAzLTY3WjYxZTVjYzZmNQBGAAAAAACcDWetQ6WERIGs0o7PAGJmBwCNTKQA656PRpu6YuCkDLmfAAAAAAESAACNTKWA656PRpu6YuCkDLmfAAAJOpJ3AAA=


What I am getting wrong? Without having an identifier that I can match with what is already present on our DB I cannot be sure which task is which. (The same happens with calendar items, but there I can use the iCalUId field for comparison, which doesn't seem to have this problem).

Thank you in advance for any help.

microsoft-graph-todo
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DanieleMorelli-2596 avatar image
0 Votes"
DanieleMorelli-2596 answered

Ok this is one of those cases in which you realize the error a couple of minutes after asking for help on a forum.

The cause is a mismatch between the two API calls, the first dealing with the old (and soon to be deprecated) 'outlookTask' object, the second being a call for new todoTask dataset. By changing the creation API call and let it point to the new "me/todo/lists/<list_id>/tasks" the ID that is returned after creation has the same format as the ones I receive after the delta-call.

I'll leave this question here anyway, in case it can help someone else.
Thanks

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.