You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to apply a PNP Template to a SharePoint site using Invoke-PnPTenantTemplate with a managed identity as follows
$SPOConnection = Connect-PnPOnline -Url "https://tenant-admin.sharepoint.com" -ManagedIdentity -ReturnConnection Invoke-PnPTenantTemplate -Path $TemplateFile -Connection $SPOConnection
No matter what I do, I get a (401) Unauthorized. The script is running in an Azure VM, and I've already done the following.
Can someone tell me what I'm doing wrong or what I should do in order for the managed identity of my VM to be authorized to invoke PNP templates?
Beta Was this translation helpful? Give feedback.
All reactions