New-PnPSite Authorization_RequestDenied #537
Unanswered
petercarson
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
-
Working on getting my Teams Provisioning open source project working with the App Only certificate based authentication. I had been doing all my early work with Communication Sites as they are quick and easy to provision. Started doing some testing and realized it isn’t working with Team Sites.
I have a simple test script that I'm working with that authenticates with a local certificate. It creates a communication site fine, but not a Team site. I'm thinking it has to do with the groups behind this. It's not provisioning a Team just yet. Below is the script, error, and permissions. Thoughts?
Thanks,
Peter
Connect-PnPOnline -Tenant $tenant -ClientId $clientID -Thumbprint $thumbprint -Url $URL
$web = Get-PnPWeb
$web
$siteTitle = "pstest8"
$siteURL = https://envisionitdev.sharepoint.com/sites/$siteTitle
$alias = $siteTitle
$owner = [email protected]
New-PnPSite -Type CommunicationSite -Title $siteTitle -Url $siteURL -Owner $owner
New-PnPSite -Type TeamSite -Title $siteTitle -Alias $alias -IsPublic
New-PnPSite : Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.
Beta Was this translation helpful? Give feedback.
All reactions