New-PnPWeb does not work with -ManagedIdentity flag in Azure Automation #3515
Unanswered
eshartwell
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.
-
When using a system managed identity, most options work, when attempting to create a sub web within a site collection, I receive the following error when getting a new list item from the site collection and then processing.
Connect-PnPOnline -Url $collection -ManagedIdentity
$newSite = New-PnPWeb -Title $subSiteTitle -Url $subSiteDir -Description $siteType -Locale 1033 -Template $template -BreakInheritance
New-PnPWeb : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
This same script worked well before switching from an actual service account (user), but nothing seems to work to create the site when using the system managed identity. I've omitted the variables and actual site names above, but I've ensured they all contain the same URL, paths, subsite names, templates, etc. Any suggestions? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions