Forum Discussion
how to map private business onedrive to view within sharepoint folder
- Nov 11, 2022
StefBon Mhm.....
Well, the link is just a link to a folder on the Onedrive website. You will still need to share that folder with you entire company or they will get a "permission denied" error
But in your case...
Could you just directly synchronize the desired local folder in your SharePoint structure using the Onedrive client? (I mean by navigating to the folder in SharePoint and then pressing the "Synchronize" button). Then the maps would be directly synced into the structure without Onedrive as an extra waypoint.
If that functionality is disabled by your IT-Department, you should go, talk to them and ask them for an exception, as this seems to be a valid usecase for that functionality.Or you could think about other synchrinization methods
You could for example use PnP Powershell in a scheduled task to sync a local folder into a SharePoint folder$localUploadFolder="D:\work" $destinationSharePointSite="https://tenant.sharepoint.com/sites/filestructure" $destinationFolderSharePoint="SiteAssets/folder1/folder2" Connect-PnPOnline $destinationSharePointSite Get-ChildItem $localUploadFolder -Recurse | Foreach-Object { $relativePath= $_.FullName -replace [regex]::Escape($localUploadFolder), '' -replace "\\","/" $path = "$($destinationFolderSharePoint)$($relativePath)" if ($_.Attributes -ne "Directory") { Write-Host "Uploading $($_.FullName) to $($path)" Add-PnPFile -Path $_.FullName -Folder $path } else { Write-Host "Scanning Folder $($_.FullName)" } }
Or there is the possibility to use the SharePoint Migration Tool in a scheduled task.
https://learn.microsoft.com/en-us/sharepointmigration/introducing-the-sharepoint-migration-tool
SvenSieverding hi Sven. Thank you for your comments. Very helpful. Just to elaborate. The reason for this is because a program we are running maps to OneDrive. But with limitations. It doesn’t allow us to map to our existing company SharePoint structure. So we’ve had to create its own SharePoint login. And the software has created its file structure within that login. So now we need all our users to be able to see that new software file structure. So my thinking was to share the folder to our company group and create a link in our existing folder so everything is visible in one place. So the link I create as you have mentioned needs to be something I can implement company wide ? I am not sharing my personal OneDrive at all. It is only the new software login which remains company property. Many thanks again.
StefBon Mhm.....
Well, the link is just a link to a folder on the Onedrive website. You will still need to share that folder with you entire company or they will get a "permission denied" error
But in your case...
Could you just directly synchronize the desired local folder in your SharePoint structure using the Onedrive client? (I mean by navigating to the folder in SharePoint and then pressing the "Synchronize" button). Then the maps would be directly synced into the structure without Onedrive as an extra waypoint.
If that functionality is disabled by your IT-Department, you should go, talk to them and ask them for an exception, as this seems to be a valid usecase for that functionality.
Or you could think about other synchrinization methods
You could for example use PnP Powershell in a scheduled task to sync a local folder into a SharePoint folder
$localUploadFolder="D:\work"
$destinationSharePointSite="https://tenant.sharepoint.com/sites/filestructure"
$destinationFolderSharePoint="SiteAssets/folder1/folder2"
Connect-PnPOnline $destinationSharePointSite
Get-ChildItem $localUploadFolder -Recurse | Foreach-Object {
$relativePath= $_.FullName -replace [regex]::Escape($localUploadFolder), '' -replace "\\","/"
$path = "$($destinationFolderSharePoint)$($relativePath)"
if ($_.Attributes -ne "Directory") {
Write-Host "Uploading $($_.FullName) to $($path)"
Add-PnPFile -Path $_.FullName -Folder $path
}
else {
Write-Host "Scanning Folder $($_.FullName)"
}
}
Or there is the possibility to use the SharePoint Migration Tool in a scheduled task.
https://learn.microsoft.com/en-us/sharepointmigration/introducing-the-sharepoint-migration-tool
- StefBonNov 11, 2022Copper ContributorHi Sven,
Many thanks for your input and ultimate solution.
Your first option worked a treat.
thank you
Stef
""Could you just directly synchronize the desired local folder in your SharePoint structure using the OneDrive client? (I mean by navigating to the folder in SharePoint and then pressing the "Synchronize" button). Then the maps would be directly synced into the structure without OneDrive as an extra waypoint.
If that functionality is disabled by your IT-Department, you should go, talk to them and ask them for an exception, as this seems to be a valid usecase for that functionality.""