Forum Discussion
Export to file and dynamic bind dataset
This should be possible now for certain file types (I tested using PDF).
The Export To File In Group endpoint now supports a datasetToBind field:
Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
There seems to be a similar field for Export to File:
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
This can be used to specify the dataset ID that you want to dynamically bind your report to. I have tested Export To File In Group with a dataset that is in a different workspace to my report and the API call was able to resolve the workspaceId of the dataset automatically.
Keep in mind that you may need to update your Power BI client library in order to access this field. I am using the .NET client and needed to update to version 4.10.0:
Does this really work? Because I receive a Report with "Something's wrong with one or more fields" when I try to do this.