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
Also, the exception doesn't occur if connected to WellKnownFolderName.Inbox.
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.