Skip to content

Attempted to perform an unauthorized operation / Rights issue using PnP Powershell 7 #1800

Answered by jerome-dl
jerome-dl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,

I should have reported sooner that I solved the issue by changing the way I connect. I thought a "global" connection on Sharepoint was possible but it needs to be more specific.

Doesn't work:

Connect-PnPOnline -Url https://[mytenant].sharepoint.com -Credentials $O365Credential
Get-PnPFile -Url "/sites/[myrootsite]/[mysite]/Documents/...blabla...xlsm"

Works:

Connect-PnPOnline -Url "https://[mytenant].sharepoint.com/sites/[myrootsite]/[mysite]"
Get-PnPFile -Url "Documents/...blabla.....xlsm"

So, I need to proceed with various Connect-PnPOnline when needing to access different subsites of my SharePoint structure.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jerome-dl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants