If you've already got your azure certificate created, here's a way to upload with a Powershell task using the certificate for auth:
You'll need to install a couple Powershell modules..
Install-Module Microsoft.Online.SharePoint.Powershell
Install-Module PnP.Powershell
Then create a Powershell task and set up your parameters to pass in. Here's a script that I found to be working:
param (
[string] $TenantId,
[string] $ClientId,
[string] $SharePointURL,
[string] $CertificatePath,
[string] $CertPW,
[string] $SharePointFolder,
[string] $LocalFolder,
[string] $LocalFileMask
)
Connect-PnPOnline -Url $SharePointURL -ClientId $ClientId -Tenant $TenantId -CertificatePath $CertificatePath -CertificatePassword ( $CertPW | ConvertTo-SecureString -AsPlainText -Force )
cd $LocalFolder
foreach ( $spfile in ( Get-ChildItem -File -Path $LocalFolder -Filter $LocalFileMask ) ){
Add-PnPFile -Path "$spfile" -Folder "$SharePointFolder"
}
Edited by user
2022-09-01T15:32:52Z
|
Reason: Not specified