Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

polito/onedrive-graph-sync

Open more actions menu

Repository files navigation

onedrive-graph-sync

This simple program syncs a local folder with a remote OneDrive location. Create a .env file following the example for configuration.

App grants setup

The following will prompt user login: login with a user with admin permissions on the sharepoint/onedrive drive you want to sync.

Install-Module -Name Az -Repository PSGallery -Force
Install-Module PnP.PowerShell -Scope CurrentUser

$siteUrl = "https://politoit.sharepoint.com/teams/SOME_TEAM"
$clientId = "deadbeef-abba-acca-adda-deadbeef1234"
$tenant = "politoit.onmicrosoft.com"
 
Connect-PnPOnline -Url $siteUrl -Interactive
$writeperm = Grant-PnPAzureADAppSitePermission -Permissions "Read" -Site $siteUrl -AppId $clientId -DisplayName "SOME_MEANINGFUL_NAME"
$PermissionId = Get-PnPAzureADAppSitePermission -AppIdentity $clientId
Set-PnPAzureADAppSitePermission -Site $siteurl -PermissionId $(($PermissionId).Id) -Permissions "FullControl"

About

Readonly onedrive client in NodeJS, sync local folder with remote contents

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.