How to get Item web client id in Exchange 2007 using EWS Managed API
I have an EmailMessage it开发者_StackOverflow中文版em saved in Draft folder. I need to open an editing form of it in browser, but cannot found id that is used by web client. In documentation there is such property, but it fails with Microsoft Exchange Server 2007. What is alternative? Any help is appreciated.
I've found.
ExchangeService service = new ExchangeService();
EmailMessage message = EmailMessage.Bind(new ItemId("someId"));
var alternateId = new AlternateId();
alternateId.UniqueId = message.Id.UniqueId;
alternateId.Mailbox = "somemailbox";
alternateId.Format = IdFormat.EwsId;
var convertedId = service.ConverId(alternateId, Format.OwaId) as AlternateId;
And convertedId.UniqueId is what I need;
精彩评论