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