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
Krupa_Parmar
Regular Visitor

Import Power BI report from one workspace to another workspace

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. 

1 ACCEPTED SOLUTION
Poojara_D12
Super User
Super User

Hi @Krupa_Parmar 

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.

 

fabric-community-super-user-fy24-25.png

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

4 REPLIES 4
Poojara_D12
Super User
Super User

Hi @Krupa_Parmar 

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.

 

fabric-community-super-user-fy24-25.png

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

@Poojara_D12 , Thanks for the reply
Can you share more details on how can I pass the file as binary content?

Hi @Krupa_Parmar 

Can you please dm so that it can be easy to understand and solve it.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

@Poojara_D12 Please check your DM

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