kevinnmo's avatar
kevinnmo
New Member
6 years ago
Status:
New

REST API - import .rdl file fails using .NET sdk

Hi

 

I have an A4 embedded instance set up using Service Principal.

 

I can import a paginated report .rdl file in a workspace using the PowerBI web ui.

 

However if I try to import the same .rdl file using the REST API via the .NET sdk using the PostImportWithFileAsyncInGroup it fails with "BadRequest" error with response

{"error":{"code":"RequestedFileIsEncryptedOrCorrupted","pbi.error":{"code":"RequestedFileIsEncryptedOrCorrupted","parameters":{},"details":[],"exceptionCulprit":1}}}

 

I am able to import a .pbix successfully.

 

Does anyone have any ideas what may cause this?

 

Thanks

 

7 Comments

  • Anonymous's avatar
    Anonymous
    Not applicable
    This issue still persist until now. Is anybody working on it or any solution?
  • Hi Anonymous 

     

    Yes, we managed to get it working after opening a support ticket with Microsoft.

     

    When calling the PostImportWithFileAsyncInGroup method you need to ensure that the datasetDisplayName property/argument ends with ".rdl" - that solves the problem!

     

    I hope this helps

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Yes it I format the name with suffix ".rdl". but my issue is fix now by using this ImportConflictHandlerMode.Abort for nameconflict.

     

    Thankyou for the help. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    I facing the same issue, could you please share the script that you used to fix it? 😊

    Thanks!

  • There appear to be many people with this issue. Is there a definitive guide or maybe some example code that is verified to be working?