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

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
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.