OneDrive Files Sample Code

The following samples are available on GitHub in the OneDrive organization. All of our samples are licensed under the MIT license and are open source projects.

Additional samples for the Microsoft Graph are available from the Microsoft Graph organization on GitHub.

Windows / .NET

HTML / Web apps

  • OneDrive Explorer (JavaScript) An HTML explorer for files in OneDrive and OneDrive for Business. Highlights using Microsoft Graph to access files in OneDrive from a single page web application.

  • OneDrive Text Editor (JavaScript) An example application that uses the OneDrive file picker and Microsoft Graph API to open, edit, and save text files from OneDrive and OneDrive for Business.

  • File picker for JavaScript Connect your JavaScript web application or website to open and save files with OneDrive without writing any user interface code.

Microsoft Office Add-ins

ASP.NET MVC

  • OneDrive Webhooks Example An ASP.NET MVC app that demonstrates how to use OneDrive webhooks to receive change notifications from OneDrive and retrieve files that have changed.

Apple iOS

Android

  • OneDrive Explorer (Android) This sample illustrates basic concepts for interacting with the OneDrive API from an Android application.

  • File picker for Android Connect your Android app to OneDrive with a few lines of code. No need to use the API or build a user interface.