Table of Contents
This sample Cordova application uses Office 365 APIs to demonstrate how to enumerate files stored in OneDrive.
To run this sample, you need:
- Visual Studio 2013 with Update 3
- Multi-Device Hybrid Apps (Preview) Extension
- Office 365 API Tools for Visual Studio 2013
- An Office 365 developer site.
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.
- In the Solution Explorer window, right click on project head - OneDriveExplorer (Multi-Device Hybrid App)
- Select Add -> Connected Service.
- A Services Manager window will appear. Choose Office 365 and Register your app.
- 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.
- 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.
- 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
- After clicking OK in the Services Manager window, JavaScript client libraries for Office 365 will be added to your project.
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.