Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
I’m exploring options for importing a Power BI report from one workspace to another or from One-drive Path to a workspace using the REST API. Has anyone tried this before? If so, could you share your experience, steps, or any challenges you faced during the process?
I've tried importing pbix from one-drive with rest API - POST "https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports?datasetDisplayName={datasetDisplayName}" but One-drive path isn't supported with this one.
Any guidance or insights would be greatly appreciated!
Thank you in advance.
Solved! Go to Solution.
The Power BI REST API does not support directly importing a .pbix file from a OneDrive path. To import a report into a workspace, you need to upload the .pbix file using the REST API endpoint POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports, providing the file as binary content in the request. If the file is on OneDrive, you can use the Microsoft Graph API to programmatically download it (via GET /me/drive/root:/path/to/file.pbix:/content) and pass it as a stream to the Power BI API. Ensure you have the necessary permissions (Dataset.ReadWrite.All for Power BI and Files.ReadWrite for OneDrive). Note that the file must be under 1 GB, and you can handle conflicts with the nameConflict parameter. Combining these APIs enables automating report uploads effectively.
The Power BI REST API does not support directly importing a .pbix file from a OneDrive path. To import a report into a workspace, you need to upload the .pbix file using the REST API endpoint POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports, providing the file as binary content in the request. If the file is on OneDrive, you can use the Microsoft Graph API to programmatically download it (via GET /me/drive/root:/path/to/file.pbix:/content) and pass it as a stream to the Power BI API. Ensure you have the necessary permissions (Dataset.ReadWrite.All for Power BI and Files.ReadWrite for OneDrive). Note that the file must be under 1 GB, and you can handle conflicts with the nameConflict parameter. Combining these APIs enables automating report uploads effectively.
@Poojara_D12 , Thanks for the reply
Can you share more details on how can I pass the file as binary content?
Can you please dm so that it can be easy to understand and solve it.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.