Skip to content

Get-PnPTenantSite : System.InvalidOperationException: The type of data at position 1684 is different than the one expected. #3577

@siata13

Description

@siata13

Hi,

When try to obtain the PnPTenantSite information exception is thrown. Seems, it is related to parsing of the JSON result received from O365. I have checked the traffic with fiddler and it seems that the result coming from O365 is correct.

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Steps to reproduce behavior

Execute 'Get-PnPTenantSite' cmdlet with or without parameters.

Expected behavior

Receive TenantSite / List of TenantSite objects.

Actual behavior

Exception is thrown:

System.InvalidOperationException: The type of data at position 1687 is different than the one expected.
at Microsoft.SharePoint.Client.JsonReader.ReadGuid()
at Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.InitOnePropertyFromJson(String peekedName, JsonReader reader)
at Microsoft.SharePoint.Client.ClientObject.FromJson(JsonReader reader)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SharePoint.Client.ClientRequest.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SharePoint.Client.ClientRuntimeContext.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SharePoint.Client.ClientContext.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.SharePoint.Client.ClientContextExtensions.d__7.MoveNext()

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)status:working-on-itKnown issue / feature being addressed. Will use other "status:*" labels & comments for more detail.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions