Skip to content

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

@YuriySamorodov

Description

@YuriySamorodov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions