title: Microsoft Graph get filename
body: <p>Currently stuck with getting the filename of a ressource from SharePoint online aka Office 365. Authentication and refresh token is from the Unified Api example aka Microsoft Graph.  </p>
  
  <pre><code>var authResult = await authContext.AcquireTokenByAuthorizationCodeAsync(   
  ...
  var imgBytes = await httpClient.GetByteArrayAsync(parameters.FileGet);
  return File(imgBytes, "application/specialFormat", "File1.specialFormat");
  </code></pre>
  
  <p>At the moment I have to define my own filename. I' ve already seen the example at <a href="http://graph.microsoft.io/en-us/docs/overview/overview" rel="nofollow">http://graph.microsoft.io/en-us/docs/overview/overview</a>, but the "GET my files" example shows only how to get the files of one person and not how to get a filename based upon a file Id. I hope someone could clarify this.</p>
  
  <pre><code>https://graph.microsoft.com/v1.0/me/drive/root/children
  </code></pre>
  
  <p>Is getting a filename based upon the file id with the Graph api possible or do I have to use something else?</p>
  
  <p>EDIT 
  Some queries that would work:</p>
  
  <pre><code>https://graph.microsoft.com/v1.0/me/drive/root/children?$select=id
  https://graph.microsoft.com/v1.0/me/drive/root/children?$filter=name eq 'testfile.office'
  </code></pre>
  
  <p>But if I try to search for the specific id the query fails and I get none information.</p>
  
  <pre><code> https://graph.microsoft.com/v1.0/me/drive/root/children?$filter=id eq '01QXOQU7OCV7FW2BQNAZD3KNZMYXVMNJD6'
  </code></pre>