Forum Discussion

Ganchut's avatar
Ganchut
New Member
3 years ago

Power BI Rest API - Upload Excel file

Hello. I am new to Power BI and I am trying to publish an Excel file through: https://docs.microsoft.com/en-us/rest/api/power-bi/imports/post-import.

 

I have created a powershell and I have no problems publishing PBI or RDL, but when I try to publish an Excel file it always returns a 400 error. Could you help me? Thank you very much and greetings.

5 Replies

    • Ganchut's avatar
      Ganchut
      New Member

      Hi @v-shex-msft 

       

      Effectively I am using the credentials of type "service principal". As I mentioned, I only have problems with Excel files.

      These are XLSX, but they do not contain a table with data, but rather a report made with Excel with its connections to SSAS.

      From the PowerBI portal, I can import the file without any problem, but when I try to import it through the API, it always returns a 400 error.

       

       

      Thank you very much for your help.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Ganchut,

        Have you try to use the other methods to invoke the rest API? If these methods worked, they mean contain limitations to using 'service principal' credentials to invoke that API.

        Regards,

        Xiaoxin Sheng

  • Hi Anonymous 

     

    Effectively I am using the credentials of type "service principal". As I mentioned, I only have problems with Excel files.

    These are XLSX, but they do not contain a table with data, but rather a report made with Excel with its connections to SSAS.

    From the PowerBI portal, I can import the file without any problem, but when I try to import it through the API, it always returns a 400 error.

     

     

    Thank you very much for your help.