Integrate apps with OneDrive
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Adaptive Cards community call-February 2019
Microsoft 365 Developer
PowerApps community call-February 2019
Microsoft 365 Developer
Microsoft Graph community call-March 2019
Microsoft 365 Developer
Office Add ins community call-March 2019
Microsoft 365 Developer
PowerApps community call-March 2019
Microsoft 365 Developer
Microsoft Teams community call-March 2019
Microsoft 365 Developer
Using React and Office UI Fabric React Components
Microsoft 365 Developer
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
Microsoft Graph community call-April 2019
Microsoft 365 Developer
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
Office Add Ins community call-April 2019
Microsoft 365 Developer
Adaptive Cards community call-April 2019
Microsoft 365 Developer
Microsoft Teams community call-April 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
Getting Started with Microsoft Graph
Microsoft 365 Developer
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
Adaptive Cards community call-May 2019
Microsoft 365 Developer
Office Add-ins community call-May 2019
Microsoft 365 Developer
Why We Built on Microsoft Teams
Microsoft 365 Developer
Microsoft Teams community call-May 2019
Microsoft 365 Developer
Microsoft Graph community call-June 2019
Microsoft 365 Developer
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Office Add -ins community call-June 2019
Microsoft 365 Developer
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer
More on: API Design
View skill →Related Reads
📰
📰
📰
📰
The Anthropic-Physical Intelligence rumor roiling AI Twitter
TechCrunch AI
The AI Layoff Bet Most Companies Are Losing
Medium · AI
TAI #214: Kimi K3 Brings Open Weight Closer to the Frontier
Medium · AI
Personality tests are broken — Origin Of You by Inithouse is a written portrait instead
Medium · AI
🎓
Tutor Explanation
DeepCamp AI