<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get POWER BI Import Error Programmatically in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4158716#M55375</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; I replied back ,can you help.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 05:45:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-19T05:45:08Z</dc:date>
    <item>
      <title>How to get POWER BI Import Error Programmatically</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4122766#M55011</link>
      <description>&lt;P&gt;I am using Power BI&amp;nbsp;(Microsoft.PowerBI.Api.Models) SDK Model in our C# Application . When we Import report it returns importstate only success or failed but I need some more information in my code like Import Error if ImportState is Failed. How can I get such information.&lt;/P&gt;&lt;P&gt;This is the below piece of code .&lt;/P&gt;&lt;P&gt;When Looking at Import Model Class ,it does not have any property exposed which denotes ImportError .What is the solution to figure out ImportError if ImportState is Failed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Import import = &lt;SPAN class=""&gt;await&lt;/SPAN&gt; io.PostImportWithFileAsyncInGroup(GroupID, file, ImportConflictHandlerMode.Abort, cancellationToken: token);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; &lt;SPAN class=""&gt;public&lt;/SPAN&gt; &lt;SPAN class=""&gt;class&lt;/SPAN&gt; &lt;SPAN class=""&gt;Import&lt;/SPAN&gt;
        {
          
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; Guid Id { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
        
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; &lt;SPAN class=""&gt;string&lt;/SPAN&gt; Name { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
           
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; &lt;SPAN class=""&gt;string&lt;/SPAN&gt; ImportState { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; IList&amp;lt;Report&amp;gt; Reports { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
        
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; IList&amp;lt;Dataset&amp;gt; Datasets { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
    
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; DateTime? CreatedDateTime { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    
            &lt;SPAN class=""&gt;public&lt;/SPAN&gt; DateTime? UpdatedDateTime { &lt;SPAN class=""&gt;get&lt;/SPAN&gt;; &lt;SPAN class=""&gt;set&lt;/SPAN&gt;; }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 12:25:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4122766#M55011</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-28T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get POWER BI Import Error Programmatically</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4124308#M55018</link>
      <description>&lt;P&gt;Hi&amp;nbsp; @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems to be related to the request information. You can add some try-catch blocks in your code to see the specific error messages. Additionally, check if your method definitions match those in the API package. If they don’t match, the request might not have been sent at all. Finally, make sure the version you are using is not too old, as it might be incompatible with the new version.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nuget.org/packages/Microsoft.PowerBI.Api/#versions-body-tab" target="_blank"&gt;NuGet Gallery | Microsoft.PowerBI.Api 4.20.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 06:49:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4124308#M55018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-29T06:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get POWER BI Import Error Programmatically</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4124352#M55019</link>
      <description>&lt;P&gt;We have (4.5.0.0) Version of Microsoft.PowerBI.API&amp;nbsp; installed ,there is no change in Import Model in latest 4.20.0.0 also. Problem is in Import Model class there is no property exposed which provides me Error Info about Import . It has a property of ImportState which return status as succedded ,Publishing and Failed but I need to Know the Cause of the ImportState Failed Error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding try catch is not helpful as it does not throw exception when Import is Failed ,it Just returns ImportState as Failed .I refered the GitHub Project also regarding this Microsoft API Model .There is no exposed property which provides us ImportError (&lt;A href="https://github.com/microsoft/PowerBI-CSharp/blob/master/sdk/PowerBI.Api/Source/Models/Import.cs" target="_blank" rel="noopener"&gt;PowerBI-CSharp/sdk/PowerBI.Api/Source/Models/Import.cs at master · microsoft/PowerBI-CSharp · GitHub&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Import import = await io.PostImportWithFileAsyncInGroup(WorkspaceID, file, "FILENAME" ImportConflictHandlerMode.CreateOrOverwrite, cancellationToken: token);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import.ImportState --&amp;gt; failed no exception&amp;nbsp; , (no exposed property to understand importerror)&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 07:10:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4124352#M55019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-29T07:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get POWER BI Import Error Programmatically</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4158716#M55375</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; I replied back ,can you help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 05:45:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-POWER-BI-Import-Error-Programmatically/m-p/4158716#M55375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-19T05:45:08Z</dc:date>
    </item>
  </channel>
</rss>

