Giter Club home page Giter Club logo

onedriveexplorer's Introduction

Starter Hybrid Mobile App for accessing OneDrive using Office 365 APIs

Table of Contents

Overview

This sample Cordova application uses Office 365 APIs to demonstrate how to enumerate files stored in OneDrive.

Prerequisites

To run this sample, you need:

  1. Visual Studio 2013 with Update 3
  2. Multi-Device Hybrid Apps (Preview) Extension
  3. Office 365 API Tools for Visual Studio 2013
  4. An Office 365 developer site.

Configuration

Before you can build and run the app, you need to register the app to consume Office 365 services and install the client libraries. You can do this via the Office 365 API Tools for Visual Studio (which automates the registration process). Be sure to download and install the Office 365 API tools from the Visual Studio Gallery and follow these steps.

  1. In the Solution Explorer window, right click on project head - OneDriveExplorer (Multi-Device Hybrid App)
  2. Select Add -> Connected Service.
  3. A Services Manager window will appear. Choose Office 365 and Register your app.
  4. On the sign-in dialog box, enter the user name and password for your Office 365 tenant. We recommend that you use your Office 365 Developer Site. Often, this user name will follow the pattern @.onmicrosoft.com. If you do not have a developer site, you can get a free Developer Site as part of your MSDN Benefits or sign up for a free trial. Be aware that the user must be a Tenant Admin user—but for tenants created as part of an Office 365 Developer Site, this is likely to be the case already. Also developer accounts are usually limited to one sign-in.
  5. After you're signed in, you will see a list of all the services. Initially, no permissions will be selected, as the app is not registered to consume any services yet.
  6. To register for the services used in this sample, choose the following permissions, and select the Permissions link to set the following permissions:
    • (My Files) – Enable Read users files
  7. After clicking OK in the Services Manager window, JavaScript client libraries for Office 365 will be added to your project.

Build

Select Windows-AnyCPU as your build target and press F5 to build and debug. Run the application and sign in with your organizational account to Office 365.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

onedriveexplorer's People

Contributors

davidchesnut avatar jthake avatar sureshja avatar

Stargazers

 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

onedriveexplorer's Issues

Internal Server Error

Hi,
Thank you very much for the sample. Unfortunately, your code doesn't return any files that are in my OneDrive folder. I get a 500 Internal Server Error when I run the sample. The same happened with my own code that was trying to return files(500 Internal Server Error). Any assistance greatly appreciated.

Error Details: "{"statusText":"Internal Server Error","status":500,"responseURL":"http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=https%3A//loftus-my.sharepoint.com//_api/v1.0/me/files%3F_%3D1429758640661","response":"{\n "code": "ECONNRESET",\n "errno": "ECONNRESET",\n "syscall": "read"\n}","responseType":"","responseXML":null,"responseText":"{\n "code": "ECONNRESET",\n "errno": "ECONNRESET",\n "syscall": "read"\n}","upload":{"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null},"withCredentials":false,"readyState":4,"timeout":0,"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null,"UNSENT":0,"OPENED":1,"HEADERS_RECEIVED":2,"LOADING":3,"DONE":4}"

Environment:
Ionic Framework with Cordova and Office 365 Client Libraries

Compatibility problem with office library 365 JS version 1.0.21

Hey,
To use this sample with the last office 365 library js release 1.0.21, you should first change the version in the setting.js file. because the version referenced 1.0.19 in the projet doesn't exist on nuget.

Yet, we have an error on the getfile() method . the server returns : http error 500.

HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 72
Date: Fri, 31 Oct 2014 18:00:18 GMT
Connection: keep-alive

{
"code": "ECONNRESET",
"errno": "ECONNRESET",
"syscall": "read"
}
when sending this request:
GET /ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=https%3A//elp415-my.sharepoint.com//api/v1.0/me/files%3F%3D1414778387769
we may notice a double /, but this is not the problem anyway.
Thanks for any help on this subject
cordially yours

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.