OneDrive / samples

Contains samples, scenarios, and guidance for integrating with OneDrive and SharePoint drives, drive items, and files.
MIT License
58 stars 59 forks source link

OneDrive : Samples and Scenarios

This repository contains Microsoft authored sample code to help you integrate with OneDrive and SharePoint files, drives, and drive items.

You can browse Microsoft and community created samples across many repositories through the unified sample gallery.

Samples

Samples demonstrate specific integration techniques to connect with OneDrive or SharePoint. Please see the readme files for each sample for full details.

Name Description
file-handler Shows how to build a OneDrive/SharePoint file handler. This allows you to provide custom open, edit, and create actions for various file types.
file-picker demonstrating how to use the latest service provided file picker for M365 allowing your users to easily and consistently open files stored within OneDrive and SharePoint.

Scenarios

Name Description
list-view-service-integration Demonstration of securely calling a remote AAD secured service from an SPFx list view command. Includes full setup instructions.
onedrive-files-hooks This sample application shows how an application (desktop application) can connect with either OneDrive for Business (ODB) or the OneDrive consumer (ODC) service.
throttling-ratelimit-handling Sample showing how to use the RateLimit response headers to avoid getting throttled.

Helpful Links

These topics and links are often helpful when building applications accessing files stored in OneDrive or SharePoint.

Getting Started ### M365 Development - [Microsoft 365 Development](https://developer.microsoft.com) - [Microsoft Partner Network](https://partner.microsoft.com) - [App Source](https://appsource.microsoft.com) ### SharePoint - [Overview](https://www.microsoft.com/microsoft-365/sharepoint/collaboration/) - [SharePoint Development](https://developer.microsoft.com/sharepoint) - [SharePoint Framework](https://aka.ms/spfx) ### Teams - [Overview](https://www.microsoft.com/microsoft-teams/group-chat-software) - [Teams development](https://developer.microsoft.com/microsoft-teams)
Viva Connections Development - [Overview](https://docs.microsoft.com/SharePoint/viva-connections) - [Setup Home Site](https://docs.microsoft.com/sharepoint/home-site)
SharePoint Development - [SharePoint Framework](https://aka.ms/spfx) - [Publish SPFx Apps to AppSource](https://docs.microsoft.com/sharepoint/dev/spfx/publish-to-marketplace-overview) - [Site Collection App Catalog](https://docs.microsoft.com/sharepoint/dev/general-development/site-collection-app-catalog)
Microsoft Teams Development - [Building a Teams tab with SharePoint Framework](https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab) - [Update Teams Manifest for SharePoint]()
One Drive & Graph Files - [Microsoft Graph Overview](https://docs.microsoft.com/graph/use-the-api) - [Drives](https://docs.microsoft.com/graph/api/resources/drive?view=graph-rest-1.0) - [Drive Items](https://docs.microsoft.com/graph/api/resources/driveitem?view=graph-rest-1.0) - [Sharing URL Trick](https://docs.microsoft.com/graph/api/shares-get?view=graph-rest-1.0&tabs=http#encoding-sharing-urls)
File Handlers - [Overview](https://docs.microsoft.com/onedrive/developer/file-handlers) - [Clearing Cached Manifets](https://docs.microsoft.com/onedrive/developer/file-handlers/reset-cache) - [Sample](https://github.com/pnp/contoso/tree/main/filehandler)

Authentication - [AAD: On Behalf of Authentication](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow)

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.