Forum Discussion
Save the Paginated Dynamic Subscription into the SharePoint or OneDrive
Hi All,
I would like to inquire about the possibility of saving the Paginated Dynamic Subscription into SharePoint or OneDrive, with the intention of making it accessible to our community. This approach could streamline access and ensure that all relevant stakeholders have up-to-date information in a centralized location.
Could you please advise how can we achieve this and Thank you in advance for your guidance.
I ran into this same requirement and the easiest way I found to do it was to run a custom Python script to export the report.
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft LearnHere is my function that does the export if it helps at all:
def export_report_pdf_with_filters(token: str, group_id: str, report_id: str, export_filter: str, outfile: pathlib.Path, include_hidden_pages: bool = False, poll_timeout_s: int = 300): headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"} body = { "format": "PDF", "powerBIReportConfiguration": { "reportLevelFilters": [{"filter": export_filter}], "settings": {"includeHiddenPages": include_hidden_pages} } } # 1) start start = requests.post(f"{PBI_API_BASE}/groups/{group_id}/reports/{report_id}/ExportTo", headers=headers, data=json.dumps(body)) start.raise_for_status() export_id = start.json()["id"] # 2) poll status_url = f"{PBI_API_BASE}/groups/{group_id}/reports/{report_id}/exports/{export_id}" t0 = time.time() while True: s = requests.get(status_url, headers=headers) s.raise_for_status() st = s.json().get("status") if st == "Succeeded": break if st == "Failed": raise RuntimeError(f"Export failed: {s.text}") retry_after = s.headers.get("Retry-After") time.sleep(int(retry_after) if retry_after and retry_after.isdigit() else 2) if time.time() - t0 > poll_timeout_s: raise TimeoutError(f"Polling timed out after {poll_timeout_s}s; last status={st}") # 3) download file_resp = requests.get(f"{status_url}/file", headers=headers) file_resp.raise_for_status() outfile.parent.mkdir(parents=True, exist_ok=True) outfile.write_bytes(file_resp.content) return outfileIf this helps, please consider giving Kudos. If I answered your question, mark this post as the solution.
7 Replies
- Akash_Varuna
Super User
Hi Suhel_Ansari Power BI Paginated Report subscriptions don’t natively save directly to SharePoint or OneDrive.
You can send the report via email and use Power Automate to pick up the attachment and store it in SharePoint/OneDrive. Other way is to use the Power BI Export API to programmatically export and upload reports.
Direct “Save to SharePoint/OneDrive” isn’t available out-of-the-box.- Suhel_Ansari
Helper V
hi Akash_Varuna The standard Subscription do have the option to send the out of the paginated report to Sharepoint/OneDrive, I am more interested if we can do the same in the Dynamic Subscription as seen in the following screen print. thanks
Standard Subscription:
Dunamic Subscription:
- tayloramy
Super User
I ran into this same requirement and the easiest way I found to do it was to run a custom Python script to export the report.
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft LearnHere is my function that does the export if it helps at all:
def export_report_pdf_with_filters(token: str, group_id: str, report_id: str, export_filter: str, outfile: pathlib.Path, include_hidden_pages: bool = False, poll_timeout_s: int = 300): headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"} body = { "format": "PDF", "powerBIReportConfiguration": { "reportLevelFilters": [{"filter": export_filter}], "settings": {"includeHiddenPages": include_hidden_pages} } } # 1) start start = requests.post(f"{PBI_API_BASE}/groups/{group_id}/reports/{report_id}/ExportTo", headers=headers, data=json.dumps(body)) start.raise_for_status() export_id = start.json()["id"] # 2) poll status_url = f"{PBI_API_BASE}/groups/{group_id}/reports/{report_id}/exports/{export_id}" t0 = time.time() while True: s = requests.get(status_url, headers=headers) s.raise_for_status() st = s.json().get("status") if st == "Succeeded": break if st == "Failed": raise RuntimeError(f"Export failed: {s.text}") retry_after = s.headers.get("Retry-After") time.sleep(int(retry_after) if retry_after and retry_after.isdigit() else 2) if time.time() - t0 > poll_timeout_s: raise TimeoutError(f"Polling timed out after {poll_timeout_s}s; last status={st}") # 3) download file_resp = requests.get(f"{status_url}/file", headers=headers) file_resp.raise_for_status() outfile.parent.mkdir(parents=True, exist_ok=True) outfile.write_bytes(file_resp.content) return outfileIf this helps, please consider giving Kudos. If I answered your question, mark this post as the solution.
- AnonymousNot applicable
Hi Suhel_Ansari ,
Thank you for reaching out to the Microsoft fabric community forum. Thank you tayloramy and Akash_Varuna for your helful response.
Thank you for sharing the details along with the screenshots, this really helps in understanding the scenario.
You are correct that standard paginated report subscriptions in Power BI do provide the option to deliver output directly to SharePoint or OneDrive. However, for dynamic subscriptions (data-driven/bursted), this capability is currently not supported out-of-the-box. At present, the dynamic subscription experience is limited to email delivery only, and the “Send to → SharePoint/OneDrive” destination is not available in the UI.
That said, there are supported approaches you can consider to achieve your requirement of making the dynamic outputs centrally accessible:
- Power Automate Integration (recommended no-code/low-code path):
- Maintain a driver list (SharePoint/Excel/Dataverse) with the required parameter values and output details.
- Use a scheduled flow with the Export Paginated Report action in Power Automate.
- Dynamically pass parameters, generate the report per row, and save the output file into SharePoint/OneDrive with a meaningful name.
- This ensures your community always has access to the latest files in the shared document library.
- Power BI REST API – Export to File (developer path):
- Use the Reports - Export To File REST API for paginated reports.
- Programmatically run exports with the required filters/parameters, then upload the generated files into SharePoint or OneDrive using Microsoft Graph or REST APIs.
- This is essentially the approach shared by another community member with a Python example, and it works well if you have developer resources.
- Email with Power Automate Save-Attachment Flow (simpler workaround):
- Continue with dynamic subscriptions via email, but configure a shared mailbox.
- Use Power Automate to monitor that mailbox, extract attachments, and save them to SharePoint/OneDrive.
- While functional, this option is less robust compared to Options 1 and 2.
Hope this helps, please feel free to reach out for any further questions.
Thank you.
- AnonymousNot applicable
Hi Suhel_Ansari ,
I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.
Thank you.
- Power Automate Integration (recommended no-code/low-code path):
- AnonymousNot applicable
Hi Suhel_Ansari ,
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. - AnonymousNot applicable
Hi Suhel_Ansari ,
We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.Thank you.