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
Originally posted by ItsTerryDuckett October 14, 2022
I have an Azure Runbook with a system managed identity. I'm using the following code as a simple test:
The "Connect-PnPOnline -ManagedIdentity" works fine and connects. However, the next line, "$list = Get-PnPList -Identity "listid" -Connection $conn" returns the following error: "The current connection holds no SharePoint context. Please use one of the Connect-PnPOnline commands which uses the -Url argument to connect."
If I switch the runbook back to using a "runas" account, it works fine.
If I try and use "Connect-PnPOnline -ManagedIdentity -Url $url" the above error occurs