Why do I receive webhooks with a deleted grant ID after deleting an IMAP grant?

Answer:

This behavior is normal for IMAP accounts and occurs when a grant is deleted while a sync operation is still in progress.

 

When you delete an IMAP grant, any ongoing sync jobs continue running until completion. Unlike other email providers (Gmail, Microsoft), IMAP sync operations can take significantly longer - sometimes over an hour - depending on:

 

  • Account size and number of messages
  • Amount of data being synchronized
  • Server response times

 

During this time, webhooks generated by the ongoing sync will still reference the deleted grant ID because the sync job was initiated before the grant deletion.

 

What to expect:

  • Webhooks may continue for the deleted grant until sync completes
  • New webhooks will use the correct grant ID once sync finishes
  • Larger accounts with thousands of messages may experience longer delays

 

Important: This only affects IMAP providers. Gmail and Microsoft Graph accounts typically have much shorter sync times and rarely experience this behavior.

 

Best practice: If you need to delete and recreate IMAP grants, allow time for any ongoing sync operations to complete before expecting webhooks to use the new grant ID.

Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.