I try to delete email with EWS request. So I use this documentation to do my request https://msdn.microsoft.com/en-us/library/office/aa580484(v=exchg.150).aspx
It's my soap request
var soapToDeleteItem =
'<?xml version= "1.0" encoding= "utf-8" ?>' +
' <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' +
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' +
' <soap:Body>' +
' <DeleteItem DeleteType="MoveToDeletedItems" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">' +
' <ItemIds>' +
' <t:ItemId Id="'+ item_id + '" ChangeKey="' + changeKey + '" />' +
' </ItemIds>' +
' </DeleteItem>' +
' </soap:Body >' +
' </soap: Envelope >';
And I have this answer
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorAccessDenied</faultcode>
<faultstring xml:lang="en-US">The requested web method is unavailable to this caller or application.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorAccessDenied</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The requested web method is unavailable to this caller or application.</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
I understand my add-in didn't have the permission to delete an item. But my add-in have already a ReadWriteMailbox permision. So what I can do more to delete a item with EWS request ?