none
Newly created Mailbox giving unexpected results RRS feed

  • Question

  • I am facing a strange issue where I need help. I have written a backup solution that backups Exchange online items on disk using ExportItems EWS method. Once the mailbox backup is complete, I delete the mailbox.  Next, I restore the mailbox, I use Windows Azure AD powershell cmdlets to Create the new mailbox in Exchange Online. When the mailbox is created. I query Exchange Online using Get-SearchableMailboxes EWS method to check if the mailbox
    exists.

    Next, I use Uploaditems (EWS method) to restore items to this new mailbox.  But before restoring items I check if the items to be restored already exist in the target mailbox using FindItems()
    If they exist I do not restore them. Surprisingly, the items are always found to be  existing in the mailbox which is contrary to the expected results. Is it possible that EWS is returning these results from the deleted mailbox ? 

    I am facing a similar issue for same solution for Exchange On-premises server 2013.
    1. If I use admin credentials to restore items after the new mailbox is created I get an Error - Impersonation failed.
    The first attempt to restore mailbox from backup after deletion of the mailbox is always successful.
    However, the next attempts to restore mailbox from backup after deletion of the newly created mailbox always fails with the error Impersonation failed.

    2. If I use the newly created mailbox credentials to restore items (i.e. without impersonation), EWS finds that the items already exist in the newly created mailbox. Ideally the newly created mailbox should have no items that were backed up. It is a similar behavior to what we found in Exchange Online.

    Can anyone please suggest a solution or a workaround to address this issue.

    Regards,

    Gagan


    Gagan

    Monday, May 12, 2014 12:03 PM

Answers

  • 1. Sounds like you have reconnected the old mailbox ? things take to time replicate so if your doing all these tasks within a 15 minutes period then it maybe your not allowing enough time for the operations to complete sucessfull. Have you just tried to space out your operation to ensure each operation has complete sucessfully before continuing (leave at least 1 hour between operations as a test). Eg before createing a new mailbox ensure that the mailbox you deleted is disconnected in the OnPrem enviroment purge the old Mailbox.

    >>  Impersonation failed

    Check the EWS Log on the OnPremise server I would say the error is occuring because you trying to impersonate the account the has just been deleted or disabled.

    Cheers
    Glen 

    Wednesday, May 14, 2014 4:24 AM