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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power BI REST API Export File In Group JSON deserializing error

Hello:

I am trying to use PowerBI REST API (in C#) using 

 

 

  using var response = await _httpClient.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
... 

if(response.StatusCode = HttpStatusCode.Accepted){
  var result =  await response.Content.ReadFromJsonAsync<Export>(cancellationToken: cancellationToken) 

...}

 

 

 I got response back, but when I deserialize json , it throws exception 

 

 

The JSON value could not be converted to System.Nullable`1[Microsoft.PowerBI.Api.Models.ExportState]. Path: $.status | LineNumber: 1 | BytePositionInLine: 278.

 

 

Can someone help with this error?

When I used online tryit from https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofileingroup#code-try-0 , I noticed the response is like this:

 

{
  "@odata.context": "http://.../v1.0/myorg/groups/.../$metadata#exports/$entity",
  "id": "...",
  "createdDateTime": "2021-05-05T...Z",
  "lastActionDateTime": "2021-05-05T...Z",
  "reportId": "...",
  "status": "NotStarted",
  "percentComplete": 0,
  "expirationTime": "0001-01-01T00:00:00Z"
}

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please review the solution in the following links and check whether they can help you resolve the problem.

JsonSerializer.Deserialize on Nullable value types

Why it occurs this error [The JSON value could not be converted to System.Nullable]

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.