Git Product home page Git Product logo

onedrive-explorer-js's People

Contributors

daspek avatar nokafor avatar rgregg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onedrive-explorer-js's Issues

UnauthorizedAccessException when using my app on different tenant

In my webapp I've used the Onedrive JS API, as described here: https://dev.onedrive.com/sdk/js-v7/js-picker-open.htm to allow my users to pick a file (from which the url is then sent to my webapp). For this I've registered an app as described on that same page.

This works fine with my own Onedrive Business account and colleagues on the same (Azure) tenant.

But when a customer of ours tries to use it on their account the OneDrive.js throws this error: [OneDriveSDK] calling xhr failure callback, status: 401
followed by this reponse:
(the Dutch loosely translates to: "Access Denied. You are not authorised to perform this action or open this resource")

"{
  "error": {
    "code": "-2147024891, System.UnauthorizedAccessException",
    "message": "Toegang geweigerd. U bent niet gemachtigd om deze bewerking uit te voeren of deze bron te openen.",
    "innerError": {
      "request-id": "81c39bae-5004-4657-b7a5-1e06a35da730",
      "date": "2016-07-18T10:25:38"
    }
  }
}"

Is there something I have to enable on my side to allow the customer to use my app or does the customer have to enable something on their side?

Using service account with one drive

Hi ,

Is it possible to use service account at enterprise level to access the drive contents .

How to get access token with out involving users ?.

Thanks

Change to Code Auth Flow, No CORS Header

I've modified the OD_Auth script to use the code authentication flow described here, but am getting a CORS header missing error:

XMLHttpRequest cannot load https://login.live.com/oauth20_token.srf. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is my auth callback:

var onAuthCallback = function () {
        var auth_code = getAuthInfoFromUrl(),
            appInfo = getAppInfo(),
            url = 'https://login.live.com/oauth20_token.srf',
            params = 'client_id='
                     + appInfo.clientId
                     + '&redirect_uri='
                     + appInfo.redirect_uri
                     + '&client_secret='
                     + appInfo.clientSecret
                     + '&code='
                     + auth_code
                     + '&grant_type=authorization_code',
            method = 'POST',
            xhr = createCORSRequest( method, url );

        xhr.setRequestHeader( "Access-Control-Allow-Origin", appInfo.base_uri );
        xhr.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );

        xhr.onload = function () {
            console.log( xhr.responseText );
        };

        xhr.onerror = function () {
            // Error code goes here.
        };

        xhr.send( params );
    };
var createCORSRequest = function ( method, url ) {

        var xhr = new XMLHttpRequest();

        if ( "withCredentials" in xhr ) {
            // Most browsers.
            xhr.open( method, url, true );
        } else if ( typeof XDomainRequest != "undefined" ) {
            // IE8 & IE9
            xhr = new XDomainRequest();
            xhr.open( method, url );
        } else {
            // CORS not supported.
            xhr = null;
        }

        return xhr;

    };

Am I missing something?

use different domain return url in OneDrive Filepicker

Our company wants to integrate One Drive for business in our application. Our goal is using OneDrive filepicker to download files from One Drive business account to our server. Form the One Drive for business App documentation, for filepicker, the return url must be the same domain as the request page. Our scenario is our server hosts a lot of customers and each customer has their own domains. We try to find a solution which multiple domains filepicker can share the same return url. Is it possible?

Display more than 200 items

OneDrive API returns a default page size limit of 200 items.
How can I increase this limit?

Top-parameter in odquery like:
var odquery = "?top=500&expand=thumbnails,children(expand=thumbnails(select=" + thumbnailSize + "))";
doesn't work.

See it in action!

Hello!
In order to implement a filepicker with onedrive, I cross this github project which seems to be perfect for me. The link "See it in action!" in the readme of this project seems to no longer work. Is this behaviour expected?

It leads to https://developer.microsoft.com/en-us/onedrive instead, I beleive, to something else (eg: a real example of the filepicker)

sample code for GET requests?

hello,
the sample code is nice, but currently GET requests require either following a redirect or doing an ajax GET to the "@content.downloadUrl" url, both of which fail with CORS error.
Any way to actually download files using the ondrive API? Seems pretty incomplete without that

Promise override?

Hi there!

I'm testing out integrating the OneDrive JS File Picker SDK v7.2 with our web app. Unfortunately, if I import it directly, it apparently overwrites Promise and breaks functionality that we have written in already. Do you have any suggestions around this or have plans to fix it? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.