title: ews-javascript-api Find Items does not return anything
body: <p>I'm using <a href="https://github.com/gautamsi/ews-javascript-api/" rel="nofollow noreferrer">ews-javascript-api</a> to connect to outlook exchange and read mails.</p>
  
  <p>I need to download the attachment.</p>
  
  <p>However, when I run the <code>FindItems</code> query, it returns with 0 items.</p>
  
  <pre><code>var ews = require('ews-javascript-api');
  var ExchangeService = ews.ExchangeService;
  var service = new ExchangeService(ews.ExchangeVersion.Exchange2010);
  service.Credentials = new ews.ExchangeCredentials("MY_USERNAME", "MY_PASSWORD");
  service.Url = new ews.Uri("https://outlook.office365.com/Ews/Exchange.asmx");
  
  var items = service.FindItems(ews.WellKnownFolderName.Inbox, "hasattachment:true",new ews.ItemView(1));
  
  items.then(function (response)
  {
      console.log("__________________________");
  
      console.log(response);
  },function(err){
      console.log("ERROR");
  });
  </code></pre>
  
  <p>I'm unable to understand why its happening. Does it only get the unread emails?</p>
  
  <p><strong>Output:</strong></p>
  
  <pre><code> FindItemsResults {
    totalCount: 0,
    nextPageOffset: null,
    moreAvailable: false,
    items: [],
    highlightTerms: [] }
  </code></pre>