pnp / pnpframework

PnP Framework is a .NET library targeting Microsoft 365 containing the PnP Provisioning engine and a ton of other useful extensions
https://pnp.github.io/pnpframework/
MIT License
200 stars 140 forks source link

Error parsing GetSitePropertiesByUrl with ExecuteQueryRetryAsync extension from PnP.Framework. Microsoft.Online.SharePoint.TenantAdministration.EsignatureThirdPartyProvidersInfo #982

Open magarma opened 4 months ago

magarma commented 4 months ago

Hi, not sure if it's the proper place to log this issue, but as we are using the PnP.Framework....

We have some code that is using the method from Tenant GetSitePropertiesByUrl... something like this image

We are using the PnP extension for doing the Query with Retries... The issue is that, it seems that the nightly PnP.Core included as dependency has an issue parsing the response and it's giving the following exception

System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Microsoft.Online.SharePoint.TenantAdministration.EsignatureThirdPartyProvidersInfo'.\r\n at Microsoft.SharePoint.Client.JsonReader.Read[T]()\r\n at Microsoft.SharePoint.Client.JsonReader.ReadList[T]()\r\n at Microsoft.Online.SharePoint.TenantAdministration.Tenant.InitOnePropertyFromJson(String peekedName, JsonReader reader)\r\n at Microsoft.SharePoint.Client.ClientObject.FromJson(JsonReader reader)\r\n at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)\r\n at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()\r\n at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb)\r\n at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync()\r\n at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync()\r\n at Microsoft.SharePoint.Client.ClientContext.ExecuteQueryAsync()\r\n at Microsoft.SharePoint.Client.ClientContextExtensions

Thanks.