Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Get-PnPTeamsTeam Cmdlet Fails with Parsing Error at Offset 260 #4671

Open
1 of 6 tasks
YuriySamorodov opened this issue Jan 8, 2025 · 1 comment
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@YuriySamorodov
Copy link
Contributor

YuriySamorodov commented Jan 8, 2025

Reporting an Issue or Missing Feature

I'm reporting an issue with the Get-PnPTeamsTeam cmdlet failing to parse input correctly.

Expected behavior

The Get-PnPTeamsTeam cmdlet should properly retrieve Teams data when executed, similar to how Get-PnPMicrosoft365Group works.

Actual behavior

The cmdlet returns a parsing error:

Get-PnPTeamsTeam: Input string was not in a correct format. Failure to parse near offset 260. Expected an ASCII digit.

CleanShot 2025-01-09 at 00 32 35

This error occurs consistently when trying to execute the command.

Steps to reproduce behavior

  1. Connect to Microsoft 365 (assumed to be done before this snippet)
  2. Execute the following commands:
# Error occurs
$teams = Get-PnPTeamsTeam

# This works fine
$groups = Get-PnPMicrosoft365Group -IncludeOwners

# Attempting to filter for teams using groups as workaround
$teams = $groups | where { $_.HasTeam -eq $true }

What is the version of the Cmdlet module you are running?

Version information needs to be provided by running:

PnP.PowerShell 2.99.93

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Additional Context:

  • The error appears to be consistent and reproducible
  • A workaround is possible using Get-PnPMicrosoft365Group and filtering for HasTeam property
  • The error specifically mentions a parsing issue at offset 260, suggesting potential problems with data format handling in the cmdlet
@YuriySamorodov YuriySamorodov added the bug Something isn't working label Jan 8, 2025
@gautamdsheth
Copy link
Collaborator

@YuriySamorodov - can you please uninstall this version and use the latest nightly builds ? I can't repro this in the latest build. A similar issue was fixed in a different cmdlet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants