title: How to get ContentBytes property of an email attachment using office 365 rest api? I am using node.js below is the code which i am using
body: <pre><code>outlookClient.me.folders.getFolder('Inbox').messages.getMessages().filter('IsRead eq false and HasAttachments eq true').fetchAll(10).then(function (result) {
  result.forEach(function (message) {
      message.attachments.getAttachments().fetchAll(100).then(function (attachmentResult) {
          console.log('Message "' + message.subject + '" contains ' + attachmentResult.length + ' attachment(s)');
          attachmentResult.forEach(function (attachment) {
            console.log('*    "' + attachment.name + '" (' + attachment.size + ' KB)');
  
          });
      });
  });
  </code></pre>
  
  <p>});</p>
  
  <p>in above code i am able to get all the details of attachment except ContentBytes, please suggest me how can i get the ContentBytes of an attachment.</p>