0

We have a sharepoint site with multiple external organisations who each have access to one folder only. On some occasions, our users will want to share the same document with all organisations. Is there a way they can do this with one upload rather than multiple? In other words almost a drop down menu where they can select the multiple organisation folders they want to share these documents with.

2 Answers 2

0

Just at the top of my head, this can probably be achieved via a custom column in the Document Library and also Power Automate to do the file copying.

SharePoint changes

Document Library changes: Add a new column to store list of organization values

Power Automate Flow

  1. Trigger - When a file is created
  2. Get custom file property that you created earlier which is the list of organization values
  3. Loop through the values in the custom file property
  4. For each value, "Copy File" to respective document library.

Something like below:

enter image description here

0

You can upload the same document in multiple folders using the PnP Powershell below. PnP Powershell code:

#Config Variables
$SiteURL = "https://yourdomain.sharepoint.com/sites/xyzax-version1/"
$SourceFilePath ="C:\PnP powershell.txt"
$DestinationPath = Import-CSV -path "C:\test.csv" -Header("DestinationPath") #Site Relative Path of the Library
  
#Get Credentials to connect
$Cred = Get-Credential
  
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials $Cred
      
#powershell pnp to upload file to sharepoint online
foreach ($Url in $DestinationPath )
{
Add-PnPFile -Path $SourceFilePath -Folder $Url.DestinationPath
} 

Here are steps:

1.Enter all individual employee folders URL in a .csv file.

2.Form URL as table(Title is "DestinationPath") enter image description here

3.Replace code: $SiteURL, $SourceFilePath, $DestinationPath enter image description here


If the answer is helpful, please click "√" on the left panel of the answer and kindly upvote it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.