Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jaymishra
Frequent Visitor

Cross-Workspace Report Embedding

I want to embed a cross-workspace report where the report resides in one workspace but references a dataset hosted in another workspace. I’d like to know whether the SDK provides a built-in way to handle this dynamically, instead of hardcoding the dataset IDs.

5 REPLIES 5
v-abhinavmu
Community Support
Community Support

Hi @jaymishra,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 


Thank you.

Poojara_D12
Super User
Super User

Hi @jaymishra 

Yes, the Power BI JavaScript Client SDK has a built-in feature called Dynamic Binding designed exactly for this scenario. It allows you to load a single report layout from one workspace and bind it to a different dataset on the fly when embedding, meaning you don't have to hardcode anything or maintain duplicate report files.

To use it, you just add the datasetBinding property directly to your client-side embed configuration object. The SDK will intercept the rendering phase and point the report's visuals to your target dataset ID at runtime.

Here is the clean syntax to use in your JavaScript config:

let config = {
    type: 'report',
    tokenType: models.TokenType.Embed,
    accessToken: accessToken, 
    embedUrl: embedUrl,       
    id: reportId,             // The ID of the report layout 
    
    // The built-in SDK property to dynamically bind your dataset
    datasetBinding: {
        datasetId: targetDatasetId // The ID of the dataset you want to reference
    }
};

// Embed the report into your container
let report = powerbi.embed(reportContainer, config);

When setting this up across workspaces, keep in mind that your backend code must generate an embed token that includes permissions for both the original report and the new target dataset. Also, the target dataset must share the exact same data schema (table and column names) as the original model the report was built against, or the visuals won't be able to map the data correctly.

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
ibarrau
Super User
Super User

Hi. If your service principal has permission over the dataset and report, then you can embed it. If you want to know dinamically the id of the dataset of the report, you can use the power bi rest api and ask for it. When you run a get report it shows the dataset id: https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-report-in-group

I hope that helps,


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

Happy to help!

LaDataWeb Blog

jaymishra
Frequent Visitor

How will binding dataset dynamically to the report work here?

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.