title: OneDrive for Business API item/file download content 401
body: <p>My question seems similar to <a href="https://stackoverflow.com/questions/29515578/onedrive-for-business-rest-api-put-post-401-unauthorized">OneDrive for Business REST API - PUT,POST - 401 Unauthorized</a> </p>
  
  <p>However, instead of uploading, I am trying to download a file. What's strange is that I do get the file contents and data, but the response code is a 401. </p>
  
  <p>Any idea why? Of course, I would like to be receiving a 200 and not have to ignore the response code.</p>
  
  <p>As far as my Azure AD app permissions go, I am allowing pretty much all read permissions under delegated permissions for Office 365. I have listed all the permissions I selected here, for your reference.</p>
  
  <p>Delegated Permissions I am allowing for Office 365:
  Read managed metadata 
  Run search queries as a user
  Read items in all site collections
  Read user files</p>
  
  <p>Delegated Permissions I am allowing for Windows Azure Active Directory:
  Enable sign-on and read users' profiles</p>
  
  <p>I have not enabled anything under Application Permissions.</p>