Is there any way to manage folder to delete all items there? i want to clear trash folder "deleteditems" when i used EWS i got an error :
The requested web method is unavailable to this caller or application.
Is there any workaround to make it works in web plugin ?
full code here :
var xml =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \n' +
' xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" \n' +
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" \n' +
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n' +
' <soap:Header>' +
' <t:RequestServerVersion Version="Exchange2010_SP1"/>' +
' </soap:Header>' +
' <soap:Body>' +
' <m:EmptyFolder DeleteType="HardDelete" DeleteSubFolders="true">' +
' <m:FolderIds>' +
' <t:DistinguishedFolderId Id="deleteditems" />' +
' </m:FolderIds>' +
' </m:EmptyFolder>' +
' </soap:Body>' +
'</soap:Envelope>';
Office.context.mailbox.makeEwsRequestAsync(xml, function (result) {
console.log(result);
});