Search code examples
vbaoutlookexchange-serveridentifiermapi

Is MailItem.EntryID the same for each user of shared mailbox?


We have a shared mailbox with multiple operators, collecting and inserting ERP sales orders. An order can be picked by different operators and be duplicated in ERP.

Each e-mail has a unique EntryID, but after reading documentation, I can't understand if it is the same for all users of shared mailbox or if for each user there is it's own EntryID.

If it is the same for all, I could log it in a shared file and check if it's done by EntryID.


Solution

  • The EntryID property value should be unique in the profile. And here is what MS states:

    A MAPI store provider assigns a unique ID string when an item is created in its store. Therefore, the EntryID property is not set for a Microsoft Outlook item until it is saved or sent. The EntryID changes when an item is moved into another store, for example, from your Inbox to a Microsoft Exchange Server public folder, or from one Personal Folders (.pst) file to another .pst file. Solutions should not depend on the EntryID property to be unique unless items will not be moved.

    And here is more information for the long-term EntryID values:

    Long-term entry identifiers must be unique across all message stores in the active profile; therefore, when a message or folder is copied from one message store to another, it must be assigned a new entry identifier. When a message store object is moved, the message store provider that implements the move determines whether the original entry identifier will remain valid. Some service providers assign new entry identifiers to moved objects; others do not. If there is a change, the new entry identifier will be included in the information passed to clients when they are notified of the move.