Integrate apps with OneDrive

Microsoft 365 Developer · Beginner ·📰 AI News & Updates ·4y ago

Key Takeaways

The video demonstrates how to integrate apps with OneDrive using Microsoft Graph, allowing users to access and manage files stored in OneDrive from within their own app. It covers topics such as getting lists and individual files, uploading and downloading files, and using the file picker SDK.

Full Transcript

onedrive users can access their files from any device online or offline and share files with people inside or outside their organization onedrive enables real-time co-authoring in familiar apps like word excel and powerpoint files light up with rich thumbnails for hundreds of formats video streaming analytics and more powered by microsoft graph data in onedrive is protected with advanced encryption compliance and security features that customers can trust when you store your files in onedrive your app can take advantage of the features of the microsoft cloud and your users can access their files anywhere use the file picker sdk to quickly open download save or share files stored in onedrive from within your own app using the same experience onedrive users are familiar with get information about selected files directly from the picker sdk or use the microsoft graph apis directly to interact more deeply with files use special folders to store files in well-known locations in onedrive like documents and camera roll or give your app its own personal folder onedrive customers can use or launch your app directly from within onedrive to open edit and preview files use onedrive's file handler extensions to provide icons and previews for your own custom file extensions and add your app to the new button or even your own custom actions to the menu bar to launch your app your app can get the file content in the format that is most convenient for you your app can display custom sized thumbnails for hundreds of different file formats you can download files in different formats like pdf docx and many others with microsoft graph you can access rich content through rest apis without having to download the binary explore extracted metadata from photo audio and video files and use the excel api to work directly with the raw data stored in an excel workbook you can also use the notes api to access the contents of onenote notebooks and with webhooks your app can get notified when files change so you can quickly react use the delta api to see what changed since the last time your app synchronized with the cloud let's explore the microsoft graph files related resource endpoints there's a drive and that represents the logical container of files like a document library or a user's onedrive and a drive item represents the item within a drive like a document a photo a video or a folder these two types expose data in the following ways there are properties such as id and name that expose symbols that are exposed to simple values as strings numbers and booleans there are facets such as file and photo these are complex values the presence of facets like file and photo indicate behaviors and properties of the drive item and there are references such as children and thumbnails that point to resource collections accessing the currently signed in users onedrive using the graph.microsoft.com me drive endpoint that's how you're going to get to onedrive this endpoint will return details about the user's onedrive including the date it was created last modified quoted information and what type of onedrive it is is it onedrive for business or is it onedrive consumer to view the contents of a user's onedrive use the graph.microsoft.com me drive root endpoint this endpoint will return the root folder of the onedrive account including the folder property that contains a number of folders and files at the root of the onedrive account to view the contents of the folder use the slash children endpoint and you can also access a specific folder and developers can use one of the many microsoft graph sdks to access the user's onedrive account for example to get the current signed in users root onedrive folder with the microsoft graph sdk you would use the code that you see here on the slide you're first going to get a authenticated instance of the microsoft graph client and then you're going to call the client.me.drive.rootproperty to get the root folder for the onedrive you then can issue a query on the authenticated client by going to the me dot drive endpoint and then add on additional properties as you see fit the microsoft graph also enables the signed in user to access another user's onedrive provided they've been granted access to it and the way you do this is by going to the microsoft graph users slash user id slash drive endpoint replacing the user id with the actual id of that user microsoft graph can also access onedrive accounts for more than just users and for example you can access a group's onedrive account by going to the groups id drive endpoint and the sharepoint site's default document library by going to the site id drive endpoint as well onedrive resources are returned either as drive or drive item objects a drive item represents a folder or a file and images are considered special types of files and have additional properties such as height and width and you can also determine the specific resource of a drive item with the presence of folder file or image properties on the drive item object to do one drive operations you'll need one of the following permissions that you see here on the slide the specific permission required will depend on the operation that you want to do for example if you're creating editing or deleting drives and drive items one of the right permissions is going to be required some of the permissions can be granted by a user while others must be granted to the app by an administrator the drive item resource has a property of content that can be used to get access to the files data only the drive items with the file property can be downloaded the content property returns the primary stream of the file for example to download a specific file using the microsoft graph.net sdk you would use the code that you see here on the slide after i first get an authenticated graph client and then i'm going to get a stream of data coming back from the cl from the content and then i'm going to set up where that file is going to be stored in the drive item path on my local machine then i'm going to save the stream to the local file by creating the file and then by using the file string to read the contents in and copying it to the file on disk

Original Description

In this module, you’ll learn how to get lists and individual files from OneDrive for Business with Microsoft Graph, as well as upload and download files. This video is part of a series in a playlist and is associated with a Microsoft Learning module: 'Access Files with Microsoft Graph'. Refer to the following URL to access the Microsoft Learning module for hands-on lab exercises and more resources: https://docs.microsoft.com/learn/modules/msgraph-access-file-data
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Microsoft 365 Developer · Microsoft 365 Developer · 0 of 60

← Previous Next →
1 Adaptive Cards community call-February 2019
Adaptive Cards community call-February 2019
Microsoft 365 Developer
2 PowerApps community call-February 2019
PowerApps community call-February 2019
Microsoft 365 Developer
3 Microsoft Graph community call-March 2019
Microsoft Graph community call-March 2019
Microsoft 365 Developer
4 Office Add ins community call-March 2019
Office Add ins community call-March 2019
Microsoft 365 Developer
5 PowerApps community call-March 2019
PowerApps community call-March 2019
Microsoft 365 Developer
6 Microsoft Teams community call-March 2019
Microsoft Teams community call-March 2019
Microsoft 365 Developer
7 Using React and Office UI Fabric React Components
Using React and Office UI Fabric React Components
Microsoft 365 Developer
8 Build Microsoft Teams customization using SharePoint Framework
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
9 Microsoft Graph community call-April 2019
Microsoft Graph community call-April 2019
Microsoft 365 Developer
10 Using Change Notifications and Track Changes with Microsoft Graph
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
11 Office Add Ins community call-April 2019
Office Add Ins community call-April 2019
Microsoft 365 Developer
12 Adaptive Cards community call-April 2019
Adaptive Cards community call-April 2019
Microsoft 365 Developer
13 Microsoft Teams community call-April 2019
Microsoft Teams community call-April 2019
Microsoft 365 Developer
14 Getting Started with Microsoft Graph and Application Registration
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
15 Getting Started with Microsoft Graph and the Directory API
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
16 Getting Started with Microsoft Graph and Microsoft Teams
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
17 Getting Started with Microsoft Graph Explorer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
18 Getting Started with Microsoft Graph
Getting Started with Microsoft Graph
Microsoft 365 Developer
19 Getting Started with Microsoft Graph and Mail API
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
20 Getting Started with Microsoft Graph and Office 365 Groups
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
21 Getting Started with Microsoft Graph and the Calendar API
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
22 Getting Started with the Microsoft Graph Toolkit
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
23 Getting Started with Microsoft Graph and JavaScript SDKs
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
24 Getting Started with Microsoft Graph and .NET SDKs
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
25 Discover how businesses can be more productive with Microsoft 365 integrations
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
26 Adaptive Cards community call-May 2019
Adaptive Cards community call-May 2019
Microsoft 365 Developer
27 Office Add-ins community call-May 2019
Office Add-ins community call-May 2019
Microsoft 365 Developer
28 Why We Built on Microsoft Teams
Why We Built on Microsoft Teams
Microsoft 365 Developer
29 Microsoft Teams community call-May 2019
Microsoft Teams community call-May 2019
Microsoft 365 Developer
30 Microsoft Graph community call-June 2019
Microsoft Graph community call-June 2019
Microsoft 365 Developer
31 Build Angular SPA's with Microsoft Graph - June 2019
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
32 Office Add -ins community call-June 2019
Office Add -ins community call-June 2019
Microsoft 365 Developer
33 Build Android native apps with the Microsoft Graph Android SDK - June 2019
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
34 Build MVC apps with Microsoft Graph - June 2019
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
35 Authenticate and connect with Microsoft Graph - June 2019
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
36 Microsoft Graph data connect - June 2019
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
37 Change notifications with Microsoft Graph - June 2019
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
38 Build iOS native apps with the Microsoft Graph REST API - June 2019
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
39 Build Node.js Express apps with Microsoft Graph - June 2019
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
40 Smart UI with Microsoft Graph - June 2019
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
41 Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
42 Build UWP apps with Microsoft Graph - June 2019
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
43 Build React SPA's with Microsoft Graph - June 2019
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
44 Getting Started with Microsoft Graph and Batching
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
45 Getting Started with Microsoft Graph and Change Notifications
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
46 Getting Started with Microsoft Graph and Consent Permissions
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
47 Getting Started with Microsoft Graph and Education
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
48 Getting Started with Microsoft Graph and Financials
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
49 Getting Started with Microsoft Graph and Excel
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
50 Getting Started with Microsoft Graph and Data Connect
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
51 Getting Started with Microsoft Graph and Intune
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
52 Getting Started with Microsoft Graph and Notifications
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
53 Getting Started with Microsoft Graph and OneNote
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
54 Getting Started with Microsoft Graph and OneDrive
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
55 Getting Started with Microsoft Graph and Open Extensions
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
56 Getting Started with Microsoft Graph and Paging
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
57 Getting Started with Microsoft Graph and Schema Extensions
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
58 Getting Started with Microsoft Graph and Security API
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
59 Getting Started with Microsoft Graph and Query Parameters
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
60 Getting Started with Microsoft Graph and Reporting API
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer

This video teaches developers how to integrate their apps with OneDrive using Microsoft Graph, enabling users to access and manage files stored in OneDrive. It covers topics such as getting lists and individual files, uploading and downloading files, and using the file picker SDK.

Key Takeaways
  1. Get lists and individual files from OneDrive using Microsoft Graph
  2. Upload and download files using Microsoft Graph
  3. Use the file picker SDK to quickly open, download, save, or share files stored in OneDrive
  4. Access rich content through REST APIs without having to download the binary
  5. Explore extracted metadata from photo, audio, and video files
💡 The Microsoft Graph API provides a powerful way to interact with OneDrive, enabling developers to build custom apps that integrate with OneDrive and provide a seamless user experience.

Related Reads

📰
The Anthropic-Physical Intelligence rumor roiling AI Twitter
Anthropic and OpenAI's 2026 acquisition sprees spark rumors about Physical Intelligence on AI Twitter
TechCrunch AI
📰
The AI Layoff Bet Most Companies Are Losing
Most companies are losing the AI layoff bet due to inefficient implementation, costing them more than they save
Medium · AI
📰
TAI #214: Kimi K3 Brings Open Weight Closer to the Frontier
Kimi K3 brings open weight closer to the frontier and Fable disproves an 87-year-old math conjecture
Medium · AI
📰
Personality tests are broken — Origin Of You by Inithouse is a written portrait instead
Learn how Origin Of You by Inithouse offers a written portrait as an alternative to traditional personality tests, providing a more nuanced understanding of individuals.
Medium · AI
Up next
The Most Important Conversation in AI Right Now
Matthew Berman
Watch →