<?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 ExportToFileInGroupAsync Fails with 400 Error (Bad Request) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2803905#M38960</link>
    <description>&lt;P&gt;I am building a .NET application to export Power BI reports hosted on an Azure capacity. The following code fails with a 400 Error (Bad Request) without any information:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var reportId = Guid.Parse(powerBiDashboardConfig.ReportId);
var datasetId = Guid.Parse(powerBiDashboardConfig.DatasetId);
var groupId = Guid.Parse(powerBiDashboardConfig.WorkspaceId);

// Set the export configuration properties:
var exportConfiguration = new PowerBIReportExportConfiguration
                          {
                               Settings = new ExportReportSettings
                                    {
                                        Locale = "en-us",
                                        IncludeHiddenPages = true                                        
                                    }
                                };
var exportReportRequest = new ExportReportRequest 
                          {
                               Format = FileFormat.PDF,
                               PowerBIReportConfiguration = exportConfiguration
                                };

// Send the export request:
var export = (await client.Reports.ExportToFileInGroupWithHttpMessagesAsync(groupId, reportId, exportReportRequest)).Body;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried making this call manually and the export to PDF works as expected.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 19:19:28 GMT</pubDate>
    <dc:creator>gah113</dc:creator>
    <dc:date>2022-09-28T19:19:28Z</dc:date>
    <item>
      <title>ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2803905#M38960</link>
      <description>&lt;P&gt;I am building a .NET application to export Power BI reports hosted on an Azure capacity. The following code fails with a 400 Error (Bad Request) without any information:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var reportId = Guid.Parse(powerBiDashboardConfig.ReportId);
var datasetId = Guid.Parse(powerBiDashboardConfig.DatasetId);
var groupId = Guid.Parse(powerBiDashboardConfig.WorkspaceId);

// Set the export configuration properties:
var exportConfiguration = new PowerBIReportExportConfiguration
                          {
                               Settings = new ExportReportSettings
                                    {
                                        Locale = "en-us",
                                        IncludeHiddenPages = true                                        
                                    }
                                };
var exportReportRequest = new ExportReportRequest 
                          {
                               Format = FileFormat.PDF,
                               PowerBIReportConfiguration = exportConfiguration
                                };

// Send the export request:
var export = (await client.Reports.ExportToFileInGroupWithHttpMessagesAsync(groupId, reportId, exportReportRequest)).Body;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried making this call manually and the export to PDF works as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:19:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2803905#M38960</guid>
      <dc:creator>gah113</dc:creator>
      <dc:date>2022-09-28T19:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2803926#M38962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/143560"&gt;@gah113&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Is the report you're exporting a Power BI (PBIX) report or a Paginated (RDL) report?&lt;/P&gt;&lt;P&gt;Assuming it's a PBIX report I suggest yoy try to see the response message body (using fiddler for example) to see if it contains information regarding the error reason.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:24:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2803926#M38962</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-09-28T19:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2804177#M38965</link>
      <description>&lt;P&gt;The message body reads:&amp;nbsp;&lt;EM&gt;"Export report requires effective identity to be provided for the report's dataset"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have tried to send the exportRequest with an effectiveIdentity and the same error message is returned.&lt;/P&gt;&lt;P&gt;Note that no effective identity is required when manually sending requests to &lt;EM&gt;reports/{reportId}/ExportTo&lt;/EM&gt; via the REST API.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 21:05:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2804177#M38965</guid>
      <dc:creator>gah113</dc:creator>
      <dc:date>2022-09-28T21:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2805299#M38980</link>
      <description>&lt;P&gt;AFAIK this error indicates that your report's dataset has RLS applied, so you must provide an effective identity for that dataset in the export request.&lt;/P&gt;&lt;P&gt;Are you sure you've sent the request with effective identity correctly? Did you specify the dataset ID and RLS parameters?&lt;/P&gt;&lt;P&gt;You can try to export a report with a dataset that doesn't have RLS applied and see that you don't get this error.&lt;/P&gt;&lt;P&gt;When you call the API manually you're not using a Service Principal probably, and hence you don't require to provide an effective identity.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 07:47:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2805299#M38980</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-09-29T07:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2806710#M38992</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/278935"&gt;@AmosHersch&lt;/a&gt; thanks for your help! We resolved the issue by specifying a dataset ID in the &lt;EM&gt;datasets &lt;/EM&gt;property of the effective identity we were passing.&lt;/P&gt;&lt;P&gt;Any reason this property is required for Export but not for other calls using effective identity (e.g. GenerateToken)?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 14:39:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2806710#M38992</guid>
      <dc:creator>gah113</dc:creator>
      <dc:date>2022-09-29T14:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToFileInGroupAsync Fails with 400 Error (Bad Request)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2806729#M38993</link>
      <description>&lt;P&gt;I would expect this property to be required also in GenerateToken request, especially when the request is from a Service Principal. It might work without an effective identity (or without the property) for a master user.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 14:55:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ExportToFileInGroupAsync-Fails-with-400-Error-Bad-Request/m-p/2806729#M38993</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2022-09-29T14:55:47Z</dc:date>
    </item>
  </channel>
</rss>

