none
Binding an Item from an archive mailbox using impersonation RRS feed

  • Question

  • Hello,

    i try to bind an Item with EWS Managed API from an archive mailbox without success.

    I have the following things:

    SMTP Address of the Primary mailbox

    The EntryId of the Item (I used ConvertId on Primary Mailbox )

    But binding the item always fails...

    The service is configured for Exchange 2010 SP2.
    What am i doing wrong?

    I tried Access with WellKnownFoldernames of Archive, too. But FindItems does not accept Complex Properties as ItemIds...

    Any idea?

    Regards

    Thorsten


    Best Regards/Viele Grüße Thorsten

    Tuesday, December 9, 2014 4:31 PM

All replies

  • Hi Thorsten,

    first of all: Where did you get the ItemID from? Cause that may well be changed when the item is moved to another folder, so if it's an old ID, it might be useless.

    FindItems accepts a view, that allows you to filter for basically any property out there.

    If you intend to track messages across all phases of its existence, you may be better off adding your own extended Property to the item.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Tuesday, December 9, 2014 5:20 PM
  • Hi Fred,

    thanks for your reply. I get the Id from Outlook, it's only for short term use, so it is ok if the Id changes.
    The Id works well with items form the primary mailbox, but fails with the archive mailbox.
    I'll give it a second try with FindItems, but the ItemId  a complex property which afaik is not working in FindItem.

    The documentation is horrible, so any idea in which format i have to pass the converted id (Type=AlternateId)?
    Is it the right way to convert the Id with the primary mailbox smtp address and archive set to "true"?

    Best regards

    Thorsten 

       


    Best Regards/Viele Grüße Thorsten

    Wednesday, December 10, 2014 7:17 AM
  • Hi Thorsten,

    Regarding the conversion:
    Absolutely do it with the Mailbox that owns the item (even if it is in Archive). Your target type needs to be EwsId, your source type ... well actually, I don't know (don't much work with Outlook programmatically). I'd give either EntryId, OwaId or StoreId a go and run a comparison test on an Item I know the EwsId of (EWS Explorer is your friend) to verify the result.

    Regarding Binding and Finding:
    I do not have an Exchange with active Archiving at hand (we use a Redoxx Appliance for archiving purposes), but try comparing the Archived ItemId (again, EWS Explorer is your friend) against your calculation result of what the id should be (after verifying you have the conversion properly set up).

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Wednesday, December 10, 2014 1:42 PM