Microsoft.Exchange.WebServices.Dat a.ServiceResponseException : The specified folder could not be found in the store
In office365, I am trying to access conversation history folder of another user using EWS api.The user that is trying to access has full access rights of the mailbox . If i connect to the mailbox using owa, i can access the conversation history folder including all other folders. But when i try to connect from the code using ews api below exception is being thrown:

    Microsoft.Exchange.WebServices.Data.ServiceResponseException occurred HResult=-2146233088 Message=The specified folder could not be found in the store. Source=Microsoft.Exchange.WebServices StackTrace:

Here is the relevant code
        var mailbox = new Mailbox(lyncUser.UserName);
        var lyncFolderId = new FolderId(WellKnownFolderName.ConversationHistory, mailbox);
        var lyncFolder = Folder.Bind(_exchangeService, lyncFolderId);

Also, the exception doesn't occur if connected to WellKnownFolderName.Inbox.

  • Edited by Mokchhya 23 hours 45 minutes ago
February 9th, 2015 7:07am

The WellKnowFolderEnum only works if the folder was created via the Lync 2013 client if the Mailbox is old and has been using older lync clients then you need to search for the folder via name eg see https://msdn.microsoft.com/en-us/library/office/hh243707%28v=office.14%29.aspx . Generally you want to use both methods eg try to bind to the WellKnowFolderEnum first then use the search method if that fails.

Cheers
Glen

  • Marked as answer by Mokchhya 7 hours 27 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2015 10:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics