title: Missing attachment from Outlook JS Api
body: <p>I'm creating an Outlook add-in and I would like to get each attachment from a mail using JavaScript.</p>
  
  <p>So far, it worked fine with this:</p>
  
  <pre><code>var attch = Office.context.mailbox.item.attachments;    
  for(i = 0; i &lt; attch.length; i++) {
      // Logic here
  }
  </code></pre>
  
  <p>But today, I found that an <code>.msi</code> file was missing from the <code>attch</code> variable. I think that's because this file is an executable and thus is considered as dangerous</p>
  
  <p>As a workaround, I know that I can do an AJAX Request to my ASP.Net webserver and consume Exchange API to get the full attachment list :</p>
  
  <pre><code>var exService = new ExchangeService
  {
      Url = new Uri(data.EwsURL),
      Credentials = new WebCredentials(data.Login, data.Password)
  };
  
  var message = EmailMessage.Bind(exService, new ItemId(data.mailId));
  var propertySet = new PropertySet(ItemSchema.Attachments);
  
  message.Load(propertySet);
  
  if (message.Attachments.Count == 0 || data.Type == "text" || data.Type == "full") return;
  
  foreach (var attch in message.Attachments.OfType&lt;FileAttachment&gt;().Select(attachment =&gt; attachment))
  {
      // Logic here: returns the attachments info to the webpage
  }
  </code></pre>
  
  <p>Is there a better way to get the full attachments list, using the Office.JS API?</p>