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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mariussve1
Super User
Super User

Issues with the API: Items - Get Report Definition

Hi,


I have been using a lot of the API's from Power BI, and with great luck.

Now I'm creating some cool stuff by using Log Analytics, and one of the things I get from Log Analytics is the VisualID. To connect VisualID to the correct Report page in a report I need to find this in the report.json file. This is something I can get with the Get Report Definition API.

But, when I try to use this API it returns this error message:

"errorCode": "BadRequest",
"message": "Unable to process the operation due to an error in the request"
 
 
As you can see the doc says its a POST, but no body as I can see. I have tried to use GET as well, but no luck.
When I hit the TRY IT button it works, so that is really strange.

Someone else been in the same situation and can help out?
 
Br
Marius 🙂

Br
Marius
BI Fabrikken
www.bifabrikken.no
1 ACCEPTED SOLUTION
mariussve1
Super User
Super User

I tried to copy the token from "Try It" page of the documentation, and then it works.

I reviewd access to the SPN and found out I needed to grant some more access. Now everything works 🙂

Cheers
Marius


Br
Marius
BI Fabrikken
www.bifabrikken.no

View solution in original post

8 REPLIES 8
mariussve1
Super User
Super User

Hi,

Does anyone knows if this have stopped working? Im not able to get any result from the api.

It only returns:
Resultat: {'status': 'Succeeded', 'createdTimeUtc': '2025-05-23T14:58:32.8582529', 'lastUpdatedTimeUtc': '2025-05-23T14:58:33.3270162', 'percentComplete': 100, 'error': None}

But the payload and base64 code is missing 😞



Br
Marius
BI Fabrikken
www.bifabrikken.no

When I try this "Try it" button here:
https://learn.microsoft.com/en-us/rest/api/fabric/report/items/get-report-definition?tabs=HTTP&tryIt...

It only returns:

mariussve1_0-1748012626378.png

 


Br
Marius
BI Fabrikken
www.bifabrikken.no
mariussve1
Super User
Super User

I tried to copy the token from "Try It" page of the documentation, and then it works.

I reviewd access to the SPN and found out I needed to grant some more access. Now everything works 🙂

Cheers
Marius


Br
Marius
BI Fabrikken
www.bifabrikken.no

Hello @mariussve1, could you tell me what permisssion you grant to your SPN. Thank you.

tharunkumarRTK
Super User
Super User

@mariussve1 

I ran a POST call from Power BI and it is working, Follow the below snippet and you should be able to run

let
    Source = Json.Document(Web.Contents("
https://api.fabric.microsoft.com/v1/workspaces/<workspaceId>/reports/<reportId>/getDefinition",[Headers=[Authorization="Bearer <Bearer Token>",#"Content-Type" = "application/json" ], Content=Json.FromValue([])]  ))
in
Source

 

dont forget to include your report id, workspsce id and bearer token. 

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Hi,

I will try from Power Query. Are you able to run the request from Postman?

 

br

Marius


Br
Marius
BI Fabrikken
www.bifabrikken.no
AmosHersch
Microsoft Employee
Microsoft Employee

Hi @mariussve1 ,

Did you try calling the API for the same report from the "Try It" page of the documentation Items - Get Report Definition - REST API (Report) | Microsoft Learn ?

If it returns an error, can you please paste here and response headers and body?

Hi, when I use the "try it" button it works, so kt does not give any errors then. Only when I use postman


Br
Marius
BI Fabrikken
www.bifabrikken.no

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.