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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
KieranNZ
Frequent Visitor

Bind dataset for /ExportTo from different workspaces fails

I've got a working embedded setup where the "template" reports/datasets live in a single workspace, and the "customer" datasets live in a separate workspace.

 

This is working nicely for embedding reports. However when I try to export using the "bindDataset" set in the request it fails...

POST https://api.powerbi.com/v1.0/myorg/groups/:templateGroupId/reports/:templateReportId/ExportTo


Request

 

{
        "format": "PDF",
        "powerBIReportConfiguration": {
            "datasetToBind": "{{dataset_id}}",
            "settings": {
                "locale": "en-nz",
                "includeHiddenPages": false
            },
            // RLS identity
            "identities": [
                {
                    "username": "user1@app.com",
                    "roles": [ "App User" ],
                    "datasets": [ "{{dataset_id}}","{{template_dataset_id}}" ]
                }
            ]
        }
    }

 


Response

 

{
    "error": {
        "code": "InvalidRequest",
        "message": "Export report was called with a bad request"
    }
}

 

 

Removing "datasetToBind" and the customer dataset IDs from the request works as normal.

 

ExportTo and other endpoints using datasets should work the same as embed; it should allow cross-workspace binding.

1 ACCEPTED SOLUTION
KieranNZ
Frequent Visitor

I did the classic developer move of solving my issue as soon as I asked...

To export a bound dataset, you don't need to define the template dataset ID at all in the request...

 

{
        "format": "PDF",
        "powerBIReportConfiguration": {
            "datasetToBind": "{{dataset_id}}",
            "settings": {
                "locale": "en-nz",
                "includeHiddenPages": false
            },
            // RLS identity
            "identities": [
                {
                    "username": "user1@app.com",
                    "roles": [ "App User" ],
                    "datasets": [ "{{dataset_id}}" ]
                }
            ]
        }
    }


Unfortunately I cannot verify the report data right now, but the export otherwise works. Hope this will help others

View solution in original post

1 REPLY 1
KieranNZ
Frequent Visitor

I did the classic developer move of solving my issue as soon as I asked...

To export a bound dataset, you don't need to define the template dataset ID at all in the request...

 

{
        "format": "PDF",
        "powerBIReportConfiguration": {
            "datasetToBind": "{{dataset_id}}",
            "settings": {
                "locale": "en-nz",
                "includeHiddenPages": false
            },
            // RLS identity
            "identities": [
                {
                    "username": "user1@app.com",
                    "roles": [ "App User" ],
                    "datasets": [ "{{dataset_id}}" ]
                }
            ]
        }
    }


Unfortunately I cannot verify the report data right now, but the export otherwise works. Hope this will help others

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors