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
Chris-F
Frequent Visitor

Power BI Rest API ServiceExceptionJson Valid Json

Hi

 

Am I the only one running into an issue where the ServiceExceptionJson is not returning a valid json in the Microsoft Power BI Rest API?

 

The JSON returned does not seem to be a valid json at all. Also does Microsoft have their Json Structure documented anywhere? I see there is an example on the Power BI REST API documentaitons, but it does not have when there is a value at the end of the json string "Table: Table1". which invalidates the Json

 

Thanks

5 REPLIES 5
Anonymous
Not applicable

Have the exact same issue and cannot find help for it anywhere. I get that same piece of text at the end of the JSON, which makes it impossible to deserialize.

Hey, So what i did was I basically just split the string by taking the 2nd from last }, and then everything after that I put that into a variable and do what I want with it. That has been working for me so far. There was no point in fighting to get microsoft to fix it

Anonymous
Not applicable

Thanks! Ended up doing the same thing.

GilbertQ
Super User
Super User

Hi @Chris-F 

 

Can you please let us know which API you are calling.

 

Your script you are using

 

And then the error you are getting?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

This is the API. The error is simply that the JSON is not a valid JSON. If you want to recreate this. Have one of your datasets fail a refresh on a specific table, either due to a query error or something of the like.

 

It will put at the end of the JSON, Table: <tablenamehere>. Which invalidates the JSON format.

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.