Skip to main content
All CollectionsKnowledge BaseEndpoint and SaaS AppsTroubleshooting - Endpoint and SaaS Apps
Exchange Online restore using only deleted items option restores duplicate items
Exchange Online restore using only deleted items option restores duplicate items
Updated over 10 months ago

Problem description

When restoring Exchange Online items to the same location more than once, from the same restore point, using the option for deleted items only, you notice some duplicate items have been restored. Specifically, this occurs if you restore, then delete a restored item at the target location, and restore again. A scenario such as this can be common if restores are being tested.

For example:

  1. Test folder to restore to contains messages a, b, and c.

  2. Message b is deleted for testing purposes (messages a and c are left)

  3. Deleted messages only optionis used to restore messages to the same folder using a restore point.

  4. Messages listed in the target folder are a, b, and c.

  5. Deleted messages only optionis used to restore messagesto the same folderagainfrom the same restore point.

  6. Messages listed in target folder are now a, b1, b2, and c (where 1 and 2 are different occurrences of the same message item, and showidenticalin their subject and have thesame content.

The iterations in the above example can continue producing duplicates, depending on what messages are deleted. Note that the same restore point is being used to restore withdeleted messages onlyoption to thesame target folderin Exchange Online.

Cause

When we restore any mail to a mailbox in Exchange Online, a new mail message item is created as intended, but with a new message ID that isinternalto Exchange Online. Exchange online will not allow the creation of a mail message item in a mailbox that has a message ID that has already existed in that mailbox. This is as designed by Microsoft Exchange Online, and implemented through its available APIs as used for restore purposes.

Therefore, when a restore is triggered for thefirst time, the items get restored without creating duplicates. As asecond restoreis triggered, the deleted mail items which had been already restored havenew message IDs, but the backup restore point used contains the same messages but withdifferent message IDs.

The restore processmatches message IDsto check if they are present in the target folder. In the case of a second restore as in the example described, since theold message ID( from the backed up mail item )does not match the already present new message ID, then duplicate email items are created in the same folder.

The above is expected behaviour for the restore process as described.

Resolution

To avoid this issue, and in case it is necessary to demonstrate the restore process a second time to the same target, using the same deleted items only option, and using the same restore point,a new backupof the target folder should be created, and the resulting restore point used to restore items from in the same manner. This will avoid creating duplicate mail items upon a second or subsequent restore(s).

Did this answer your question?