Forum Discussion

ms_query's avatar
ms_query
Frequent Visitor
1 year ago
Solved

404 Client Error - Export Report In Group

I'm working with PowerBi REST APIs.

While trying to Export a report from the workspace I'm getting 

'404 Client Error: Not Found for url: https://api.powerbi.com/v1.0/myorg/groups/my-workspace-id/reports/my-report-id/Export'

If I request https://api.powerbi.com/v1.0/myorg/groups/my-workspace-id/reports then 'my-report-id' is listed in the responce with webUrl: https://app.powerbi.com/groups/my-workspace-id/reports/my-report-id 

 

One more thing to notice, 'my-report-id' is cloned from a different workspace and bound to my-workspace-id's semantic model. The reports created directly inside 'my-workspace-id' get exported but not the one cloned from differnt workspace.

Don't know what is the reason behind this.

  • Hi  ms_query 

    Thank you for using Microsoft Community Forum.

     

    When a report is cloned using the API or bound to a semantic model from another workspace, Power BI generates only metadata for the report in that workspace. No PBIX file is created or transferred in this process. This is why the report’s isFromPbix property is set to false.

    Because there’s no PBIX file stored behind these reports in the workspace, that is why we are getting 404 error.

    • Open the original report in Power BI Desktop and Publish it to your target workspace. that ensures the service has a true PBIX.

    • If you need a PBIX file to export, open the report in the Power BI Service, go to File > Download this file (PBIX), save it to your computer, and then re-publish it to the workspace. This will create a proper PBIX file in the workspace that you can then export.

     

    If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.

10 Replies

  • ms_query's avatar
    ms_query
    Frequent Visitor

    Thanks BhavinVyas3003 for the reply,

    But it doesn't help. BTW the dataset was already linked when the clone API was triggered.

     

    I notice one more diference, the property 'isFromPbix': False of reports for cross workspace cloning. Don't know why it is changed while the source version has this property True.

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi ms_query 

    Thank you for reaching out to Microsoft Fabric Community.

    please try below steps it may helps you

    1.  The report you’re trying to export was cloned from another workspace, and it has a property called 'isFromPbix': False. That means it wasn’t uploaded from a .pbix file, and reports like that usually can’t be exported using the REST API—even if they show up fine and are connected to the right dataset.
    2. For the export API to work, the report needs to have been originally uploaded as a .pbix file into the workspace. Cloning from another workspace won’t work here.
    3. The fix is to re-upload the original .pbix file directly into the workspace instead of cloning it. Once it’s uploaded properly, the report should be exportable.

      If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
      Thank you.

    • ms_query's avatar
      ms_query
      Frequent Visitor

      Thanks v-priyankata for replying,

      This is an odd behaviour which is not documented by Microsoft.

      Even though the source report is from pbix file, but during the cross workspace cloning it losses the link to root pbix file and gets created by power-bi service.

      And rest/REST is as expected.

      • v-priyankata's avatar
        v-priyankata
        Community Support

        Hi ms_query
        Please look into below points.

        1. Re-upload or Re-publish the report in the target workspace.
        • Download the .pbix of the cloned report.
        • Open it in Power BI Desktop.
        • Re-bind it to the dataset in my-workspace-id (if not already).
        • Re-publish it to the same workspace.
        • Try the export API again.
        1. Check for Dataset Binding
        2. Export API Permissions
          • Ensure your service principal or user has Report.ReadWrite.All permission AND access to both:
        • The workspace (my-workspace-id)
        • The report (especially if it’s cloned — permissions don’t always carry over properly)
        • datasetId matches a dataset in the same workspace
        • reportType is PowerBIReport
        • You’re not seeing fields like isFromPbix = false (which might indicate cloning)

          If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
          Thank you.
  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi ms_query 

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi ms_query 
    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. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you.

    • ms_query's avatar
      ms_query
      Frequent Visitor

      v-priyankata Thanks for your inputs, but there is no solution for the problem as Power BI Desktop interaction is not involved.

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi  ms_query 

    Thank you for using Microsoft Community Forum.

     

    When a report is cloned using the API or bound to a semantic model from another workspace, Power BI generates only metadata for the report in that workspace. No PBIX file is created or transferred in this process. This is why the report’s isFromPbix property is set to false.

    Because there’s no PBIX file stored behind these reports in the workspace, that is why we are getting 404 error.

    • Open the original report in Power BI Desktop and Publish it to your target workspace. that ensures the service has a true PBIX.

    • If you need a PBIX file to export, open the report in the Power BI Service, go to File > Download this file (PBIX), save it to your computer, and then re-publish it to the workspace. This will create a proper PBIX file in the workspace that you can then export.

     

    If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi ms_query 
    I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
    Thank you.