Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

WorkspaceInfoClient.GetScanResultAsync throws exception JSON deserialization error PowerBI-CSharp

While using WorkspaceInfoClient.GetScanResultAsync from the Microsoft Power BI .NET SDK v5.0 (https://github.com/microsoft/PowerBI-CSharp), an exception is thrown during execution and the scan result is not returned.

The issue appears to be related to deserialization inside the SDK.

Below are the error details and stack trace.

 

{"errors":[{"message":"Unable to synchronize testing. Unable to synchronize testing","details":null,"stackTrace":null},{"message":"Unable to synchronize objects.","details":"The requested operation requires an element of type 'Object', but the target element has type 'Array'.","stackTrace":" at System.Text.Json.ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)\r\n at System.Text.Json.JsonElement.EnumerateObject()\r\n at Microsoft.PowerBI.Api.Models.RoleMember.DeserializeRoleMember(JsonElement element)\r\n at Microsoft.PowerBI.Api.Models.Role.DeserializeRole(JsonElement element)\r\n at Microsoft.PowerBI.Api.Models.WorkspaceInfoDataset.DeserializeWorkspaceInfoDataset(JsonElement element)\r\n at Microsoft.PowerBI.Api.Models.WorkspaceInfo.DeserializeWorkspaceInfo(JsonElement element)\r\n at Microsoft.PowerBI.Api.Models.WorkspaceInfoResponse.DeserializeWorkspaceInfoResponse(JsonElement element)\r\n at Microsoft.PowerBI.Api.WorkspaceInfoRestClient.GetScanResultAsync(Guid scanId, CancellationToken cancellationToken)\r\n at Microsoft.PowerBI.Api.WorkspaceInfoClient.GetScanResultAsync(Guid scanId, CancellationToken cancellationToken)\r\n

Status: New