Open stvpwrs opened 6 years ago
I have tried the same and if I change the library from "Documents" to ""Shared Documents" it works.
@floodycarlow OK so that does work! So I am unclear if I was just reading documentation wrong? Example 6 on this doc page seems to be the Title of the library in the example.
@stvpwrs Yes the same happened to me a while ago, not sure if I read the doc incorrectly or maybe it needs more clarification.
Struggled with the same as well, docu's need an update, this works for me
Reporting an Issue or Missing Feature
When attempting to use
Add-PnPFile
on a modern SharePoint team site with an Office 365 Group, like the following snippet:$uploadReport = Add-PnPFile -Path $path -Folder "Documents"
the following error occurs:
Add-PnPFile : Access denied. You do not have permission to perform this action or access this resource.
This issue does not occur when using
Add-PnPFile
to upload files to a classic SharePoint site without an Office 365 Group.The user account being used has the following permissions:
Expected behavior
The
Add-PnPFile
cmdlet should successfully upload the file to the designated document library/folder.Actual behavior
The
Add-PnPFile
cmdlet fails with the following error:Add-PnPFile : Access denied. You do not have permission to perform this action or access this resource.
Steps to reproduce behavior
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
SharePointPnPPowerShellOnline 2.27.1806.1
How did you install the PnP-PowerShell Cmdlets?