We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get server (exchange) unique ID of an item (MapiMessage / Folder / etc)

Hello everyone,

I’m using your product for a very simple scenario - I’m writing a VSTO Outlook plugin in which I’m connecting to the exchange server, download some messages, add them to a PST and then attach the PST to the outlook profile - everything is fine so far.

My issue is that I’m looking for a way to get a simple (surely existing) information from the inbox items (emails) from the default profile - I need to get the original unique ID of an email - and here I don’t mean the entry id which is given by outlook once that item was added to a store; I mean the server unique ID of that item - there should be a MAPI property that holds this information but I don’t know from where to get this MAPI tag name.

Thank you.

Hi Evdin,

Thank you for writing to Aspose Support team.

You can use the ExchangeMessageInfo’s MessageId property to get the unique id of the message when you retrieve the information from Exchange server. You may use this information for your requirements and let us know if you need any further assistance in this regard.

Sample Code

IEWSClient client = GetAsposeEWSClientTest3Account();

ExchangeMessageInfoCollection msgsColl = client.ListMessages(client.MailboxInfo.InboxUri, 1);


MailMessage eml = client.FetchMessage(msgsColl[0].UniqueUri);

MapiMessage mapi = MapiMessage.FromMailMessage(eml);



I’m sorry but is the other way around:

a) is not about the message that comes from EWS - is about the messages from the outlook store
b) I don’t need the internet message id - I need the unique ID - is a totally different thing.


Hi Evdin,

For Aspose.Email API, MapiMessage is the class that represents an Outlook message file. For adding to PST file, you need to load the MSG into the object of this class and then add it to the PST file. We couldn’t find any other unique information against a message that can be referred to for your requirements in this case. The only unique information related to a message is the MessageId that we shared with you earlier. However, we couldn’t find any other unique id for a message’s entry in the Outlook store that could be found in the MSG object.