[BUG] Get-PnPSiteScript returns 401 with -ManagedIdentity while other tenant succeed on the same connection #5420
Unanswered
NashwaTariq
asked this question in
General
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.
Expected behavior
Get-PnPSiteScript returns the tenant's site scripts, as other tenant-admin cmdlets on the same connection do.
Actual behavior
The remote server returned an error: (401) Unauthorized
Steps to reproduce
Connect-PnPOnline -Url https://-admin.sharepoint.com -ManagedIdentity
Get-PnPTenantInstance # works
Get-PnPTenantSite -Identity https://.sharepoint.com # works
Get-PnPSiteScript # 401
Environment
PnP.PowerShell: 3.3.0
Agent pool managed identity
Sites.FullControl.All on Office 365 SharePoint Online
Multi-geo tenant: failing against the satellite geo, central geo working fine
All reactions