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
Anonymous
Not applicable

PowerBI API - 400 Bad Request - On postman

I tried Power BI API in postman 

Generate access token:

  • I created an app in azure,created certificate
  • Updated PowerBI API permissions
  • Gave access to the app in Power BI dashboard

2022-09-20_15h01_31.png

Response Body:

{
    "token_type""Bearer",
    "expires_in"3599,
    "ext_expires_in"3599,
    "access_token""ey....Q"
}
GET request:

  2022-09-20_15h10_44.png

2022-09-20_15h11_23.png

  Body:

{
    "accessLevel":"View",
    "allowSaveAs" : "false"
}
 
But I still 400 Bad request error
 2022-09-20_15h17_08.png

Please help 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

It works when i try it. Did you change the host in the headers?

vchenwuzmsft_0-1663813142852.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

Your calling url should be "https://api.powerbi.com/v1.0/myorg/GenerateToken" and dataset and report id should be contained in body.

 

You can try this  in Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vchenwuzmsft_0-1663743204988.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hello @v-chenwuz-msft 

Thank you for the reply,

I still get this error in postman 

2022-09-21_15h53_17.png

but it worked in the microsoft try it. any idea if I am going wrong somewhere?

Hi @Anonymous ,

 

It works when i try it. Did you change the host in the headers?

vchenwuzmsft_0-1663813142852.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you @v-chenwuz-msft ,

 

I missed out few headers, maybe that's the reason why i got the error.

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.