Forum Discussion

KieranNZ's avatar
KieranNZ
Frequent Visitor
2 years ago
Solved

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 ...
  • KieranNZ's avatar
    2 years ago

    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": "[email protected]",
                        "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