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.
File handlers
- Markdown file handlers An ASP.NET MVC app that allows a rich preview and edit experience for Markdown text files from OneDrive and SharePoint using File Handlers 2.0
Windows / .NET
OneDrive Explorer (Windows/C#) A Windows Forms application to browse the OneDrive.
OneDrive Photo Browser (Windows/C#) An example Universal Windows App that uses the Microsoft Graph SDK to browse images from a user's OneDrive or OneDrive for Business.
Data Robot Azure Function An example ASP.NET MVC application and Azure Function to handle webhook notifications and data collaboration in Excel files.
JavaScript
OneDrive Explorer (JavaScript) An HTML explorer for the OneDrive API. Highlights using the OneDrive API 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.
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.
Markdown file handlers An ASP.NET MVC app that allows a rich preview and edit experience for Markdown text files from OneDrive and SharePoint using File Handlers 2.0
Data Robot Azure Function An example ASP.NET MVC application and Azure Function to handle webhook notifications and data collaboration in Excel files.
Office Add-ins
- Outlook add-in for OneDrive sharing Share OneDrive files directly from Outlook and manage permissions on sharing links using the OneDrive API and an Outlook add-in.
Apple iOS
OneDrive Explorer (Objective-C) An iOS application to browse files using OneDrive API.
OneDrive Sync Sample (Swift) An example application using the delta API to retrieve changes from the server and keep client state in sync.
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for