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
rkb2023
New Member

Help Needed with Power BI App Owns Data Integration in Node.js App - 400 Bad Request Error

Hello fellow Power BI enthusiasts,

I'm reaching out to the community in search of some much-needed assistance with a Power BI integration issue that has been giving me sleepless nights for the past four days. Any help or insights would be greatly appreciated!

Background: I've been working on a Power BI integration in a Node.js app, and initially, everything was running smoothly. However, I recently encountered a problem when I attempted to change the embedded report. Since then, I've been consistently getting a frustrating "400 Bad Request" error, and I'm at my wit's end trying to resolve it.

Here are some additional details:

  • I'm using a Premium Per User License for this integration.

  • To facilitate authentication, I've set up a service principal and a security group, and they've been added to the workspace for access.

  • Following the official documentation (https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-co...), I've allowed Power BI access in the Power BI admin portal.

  • This integration is built using Node.js, and it was functioning perfectly fine until I tried to embed another report.

  • All the necessary details, including the report ID, workspace ID, etc., are correctly configured in my config.json
    file.

  • The error seems to originate from within the getEmbedTokenForSingleReportSingleWorkspace
    function, particularly in the fetch request to obtain the embed token:

 

 

const result = await fetch(embedTokenApi, {

method: 'POST',

headers: headers,

body: JSON.stringify(formData)

});

 

 

 

I'm genuinely stumped by this issue and have been trying to troubleshoot it for days without success. If anyone has encountered a similar problem or has expertise in Power BI integration with Node.js, I would be immensely grateful for any insights, suggestions, or solutions you can offer.

1 REPLY 1
Anonymous
Not applicable

Hi @rkb2023 ,

According to your description, it seems that you got 400 bad request error when you embed for custom using Node.js method. And it occurred at getting the token. It may be caused by many reasons, please check the following info:

Best Regards

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.