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
I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
I have run into an issue when running commands inside the integrated console where it fails to work with pnp teams commands. It doesn't matter if I run w/wo debugging or directly in the console window. It always give the same result. The exact same commands work in the vscode powershell terminal, a new powershell window or powershell ise.
Here is a sample that has two lines, it fails to load the team site and throws an error. We have about a hundred teams in our tenant and even trying to select all teams returns a null
Powershell integration console
PS> Connect-PnPOnline -url "https://<tenant>.sharepoint.com/teams/TLTestTeam" -Interactive
PS> Get-PnPTeamsTeam -Identity "TLTestTeam"
Get-PnPTeamsTeam : Team not found
At C:\Users\tleduc\OneDrive - City of Kelowna\SharePoint Online\scripts\test2.ps1:2 char:1
+ Get-PnPTeamsTeam -Identity "TLTestTeam"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-PnPTeamsTeam], PSArgumentException
+ FullyQualifiedErrorId : PnP.PowerShell.Commands.Graph.GetTeamsTeam
PS> $error[0] | fl * -force
writeErrorStream : True
PSMessageDetails :
Exception : System.Management.Automation.PSArgumentException: Team not found
TargetObject :
CategoryInfo : ObjectNotFound: (:) [Get-PnPTeamsTeam], PSArgumentException
FullyQualifiedErrorId : PnP.PowerShell.Commands.Graph.GetTeamsTeam
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, C:\Users\tleduc\OneDrive - City of Kelowna\SharePoint Online\scripts\test2.ps1: line 2
PipelineIterationInfo : {0, 1}
PS> Get-PnPConnection
ConnectionType : O365
InitializationType : Unknown
Scopes :
PSCredential :
ClientId : 31359c7f-bd7e-475c-86db-fdb8c937548e
ClientSecret :
ApplicationInsights : PnP.PowerShell.ALC.ApplicationInsights
Url : https://<tenant>.sharepoint.com/teams/tltestteam
TenantAdminUrl :
Certificate :
DeleteCertificateFromCacheOnDisconnect : False
Context : PnP.Framework.PnPClientContext
Tenant :
AzureEnvironment : Production`
PS> Get-Module -name "PnP.Powershell"
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.7.0 PnP.PowerShell {Add-PnPAlert, Add-PnPApp, Add-PnPApplicationCustomizer, Add-PnPAzureADGroupMember...}
PS> Get-PnPTeamsTeam
PS>
Prerequisites
Summary
I have run into an issue when running commands inside the integrated console where it fails to work with pnp teams commands. It doesn't matter if I run w/wo debugging or directly in the console window. It always give the same result. The exact same commands work in the vscode powershell terminal, a new powershell window or powershell ise.
Here is a sample that has two lines, it fails to load the team site and throws an error. We have about a hundred teams in our tenant and even trying to select all teams returns a null
Powershell integration console
vscode powershell terminal
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
Visuals
No response
Logs
Logs sent via email to [email protected] due to length
The text was updated successfully, but these errors were encountered: