Outlook Addin - Calling EWS CreateAttachment gives ErrorAccessDenied RRS feed

  • Question

  • I am developing an Outlook add in (command addin). In the manifest I well put:


    Then in the JavaScript there is a button that just passes the ewsURL, the token id, and itemID (using AJAX) to the server... the server uses this information use EWS calls using SOAP.

    At this point I am debugging and I am using an Office 365 account, I take an email in my inbox... the Project runs in my localhost computer.

    I use this XML EWS request:

    @"<?xml version=""1.0"" encoding=""utf-8""?>
    <soap:Envelope xmlns:xsi=""""
        <t:RequestServerVersion Version=""Exchange2013"" />
          <t:TimeZoneDefinition Id=""Central Standard Time"" />
          <m:ParentItemId Id=""{0}"" />

    {0} {1} and {2} are replaced accordingly.

    I get:

    ErrorAccessDenied - The requested web method is unavailable to this caller or application.

    Am I allowed to call CreateAttachments using the token ID that I get when calling Office.context.mailbox.getCallbackTokenAsync?

    Again, one part of the code is the JavaScript that gets this data:

    It passes this information to an .aspx .NET Project that in the Page_Load event does the EWS/SOAP request to the Office 3656 server...

    I can well get attachments, download them, but I cannot add attachments to existing items (inbox).

    I need to transform existing attachments (e.g. an Antivirus should be a typical example of converting one attachment into a "this file has a virus" content attachment).


    Wednesday, September 20, 2017 1:45 PM

All replies