cancel
Showing results for 
Search instead for 
Did you mean: 

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

 

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @kevinnmo

 

Please create a support ticket to get help. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable
This issue still persist until now. Is anybody working on it or any solution?
kevinnmo
New Member

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
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
Not applicable

Hi @Anonymous,

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

Thanks!