title: ajax get request to Office365 REST Api fails CORS?
body: <p>I'm attempting to make an ajax GET request to the Office365 RESTful API service from my local server, but am running into cross-domain HTTPRequest errors.  The following is a sample of my 'get-files-at-root' attempt:</p>
  
  <pre><code>$.ajax({
    url: 'https://[sharepoint_site]/_api/v1.0/me/files?access_token='+token,
    type: 'get',
    dataType: 'json',
    success: function(data) {
      if (success){
        success(data);
      }
    },
    error: error
  })
  </code></pre>
  
  <p>I'm getting the following response from the server:</p>
  
  <pre><code>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 403.
  </code></pre>
  
  <p>I've tried sending the access token as a header parameter:</p>
  
  <pre><code>headers: {'Authorization': 'Bearer '+ token}
  </code></pre>
  
  <p>but this had the same result.</p>
  
  <p>Any ideas on what I'm doing wrong?</p>
  
  <p>(Background: I'm trying to create my own Office365 'file picker' on the client because I couldn't find an available library for OneDrive Business that supplies this.)</p>