Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.