Resolve-PnPFolder fails with Access denied #772
Unanswered
AbbasRashidi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using PnP PowerShell 1.5.0 and 1.6.0 and try to create folder structures with Resolve-PnPFolder.
First I connect to SPO with ClientId and Client Secret.
Connect-PnPOnline -Url $SiteURL -ClientId $clientID -ClientSecret $clientSecret -WarningAction Ignore
This is the important part. Because if I use just my credentials instead of ClientId and -Secret to connect to SPO Site everything works fine.
I already setup the app permissions "Write" to the site with the known procedure and at least this XML:
Get-PnPFolder and Add-PnPFolder both work fine. The problem with this method is, you must check and create all folders deep in the hierarchy manually.
If I use Resolve-PnPFolder, it throws an Access denied exception:
Any Ideas how to solve this issue?
Update:
If I set the App permissions in the corresponding SPO Site to "FullControl", Resolve-PnPFolder will work properly and w/o any exception. As soon as I switch back to Write or even Manage Permissions, the Cmdlet will throw an exception.
btw. here a PnP Exception trace of the error:
Beta Was this translation helpful? Give feedback.
All reactions