cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pratheeban Frequent Visitor
Frequent Visitor

Get Reports REST api not working - Showing 400 Bad Request

Hi All,

 

I am trying to retrieve the report metadata using the REST API provided,

https://docs.microsoft.com/en-us/rest/api/power-bi/reports/getreportingroup

 

REST call tried: https://api.powerbi.com/v1.0/myorg/groups/f702bdb7-e372-4990-a828-5e5449c6f676/reports/7d36d8aa-4ae8...

 

All the REST calls are working fine, except above not sure what I'm doing wrong.... Please help me understand this.

 

Thanks

9 REPLIES 9
Community Support Team
Community Support Team

Re: Get Reports REST api not working - Showing 400 Bad Request

Hi @pratheeban,

 

You need to set up permission before your invoke rest api, I don't think power bi service will allow anonymous authorization to get specific power bi contents.

Register an Azure AD app to embed Power BI content

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
pratheeban Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

Hi,

 

Thanks for the reply!

 

I did register the application. All the other REST calls are working Except this... (Showing 400 Bad request).. 

 

Not sure what I'm missing here. Pls let me know

 

Thanks

pratheeban Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

Not sure if there is any syntax mistake but I have used as per the documentation... Please help me understand that.

 

Thanks

Community Support Team
Community Support Team

Re: Get Reports REST api not working - Showing 400 Bad Request

Hi @pratheeban,

 

I'd like to suggest you post to develop forum to get better support.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
luismangahr Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

I have exactly the same problem. Did you make any progress?

 

Just to clarify to others: App is registered, I have the access token and I can use it for all the other calls. For example, I can successfully perform this request:

  

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports

  

In the response I get the list of reports. If I pick one specific report id and I just by add it to the URL path in the previous request, I get the "400 Bad Request" response...

 

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportKey}

 

pratheeban Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

Hi All,

 

I did not get any solution to the problem.

 

Thanks

human239874 Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

I am having the exact same problem. I get an HTTP 400 Bad Request response from the API even though I am passing in the GroupId and the ReportId correctly. All other APIs are working. For example Get Reports in Group (https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/reports) work as expected. However when I try and use Get Report in Group (https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/reports/{{reportId}}) I get back an HTTP 400. I am using Postman to test this and I can confirm that I have double checked the GroupId and ReportId.

 

I also have all permissions assigned to my specific user. Something is wrong with this AI endpoint,

 

UPDATE: This has been brought up in the Developer forum and it is indeed a bug. The workaround (and I have verified it works in Postman) is to add the Header "Accept" and set it's value to "none".

Erin123456 Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

I am also having the same issue. Application has been registered. Not a permissions issue.

ashahin Frequent Visitor
Frequent Visitor

Re: Get Reports REST api not working - Showing 400 Bad Request

Workaround works:

 

Add the Header "Accept" and set it's value to "none"