OfficeDev / ews-managed-api

Other
583 stars 317 forks source link

Probem with ConvertId and Archive Mailbox in Office 365 / Exchange Online #271

Open mrfloppy82 opened 2 years ago

mrfloppy82 commented 2 years ago

Hello,

since a few weeks we have problems to access the Archive Mailbox in Exchange Online. We convert a HexEntryId (MAPI entry id from outlook) to an EWSId.

var mapiEntryId = new AlternateId(IdFormat.HexEntryId, "EntryId", "Mailbox", true);
AlternateIdBase convertedId = service.ConvertId(mapiEntryId, IdFormat.EwsId);

After the conversion, we make a bind to this object.

var items = service.BindToItems(new List<ItemId> {new ItemId(convertedId.UniqueId)}, PropertySet.IdOnly);

I get following error message: The specified object was not found in the store., The store ID provided isn't an ID of an item.

With an OnPrem Exchange my code works.

Regards

Nico