sp-dev-fx-webparts/samples/react-onedrive-finder
Hugo Bernier db6c244c92
Update README.md
2021-04-21 23:17:37 -04:00
..
Assets Create sample.json 2021-04-21 23:17:14 -04:00
config WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
src clean up Style. 2021-04-19 16:15:50 +02:00
teams WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
.editorconfig WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
.gitignore WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
.yo-rc.json WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
README.md Update README.md 2021-04-21 23:17:37 -04:00
gulpfile.js WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
package-lock.json WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
package.json WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
tsconfig.json WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00
tslint.json WebPart Sample OneDrive finder 2021-04-16 11:21:04 +02:00

README.md

OneDrive finder

Summary

This sample access drives from OneDrive and navigate between his content using Graph OneDrive and Site API and Microsoft Graph Toolkit react controls "@microsoft/mgt-react" with the addition of new control FileList "still preview version" . This new control provides the ability to retrieve the Drive Library with associated Files and folders making easier to develop and navigate between tenant content and access to file.

FileList control allow to load files base on graph querys or parameters ids.

Retrieve Sites with drives associate

Demo

Navigate between folders and Breadcrumb

Demo

Compatibility

SPFx 1.11 Node.js LTS 10.x SharePoint Online Teams N/A: Untested with Microsoft Teams Workbench Hosted: Does not work with local workbench

Applies to

Solution

Solution Author(s)
react-onedrive-finder André Lage (@aaclage)

Version history

Version Date Comments
1.0 April 16, 2021 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • Ensure that you are at the solution folder
  • in the command-line run:
    • npm install
    • gulp serve
    • gulp bundle --ship
    • gulp package-solution --ship
    • Add to AppCatalog and deploy

Grant the service principal permission to the Microsoft Graph API

Once installed, the solution will request the required permissions via the Office 365 admin portal > SharePoint > Advanced > API access. If you prefer to approve the permissions in advance, for example when testing the solution in the Workbench page without installing it, you can do so using the CLI for Microsoft 365:

o365 spo login https://contoso-admin.sharepoint.com
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'Files.Read'
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'Files.Read.All'
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'Sites.Read.All'

Features

Description of the extension that expands upon high-level summary above.

This extension illustrates the following concepts:

  • Easy to navigate between shared Drives using Graph API and Breadcrumb
  • FileList control allow to load documents base on graph querys or parameters ids.