<?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: Power BI REST API ExportTo Bad Request in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1730909#M28468</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to use Fiddler to get more information on the error. It has to do with effective identities that needed to be provided in the body for RLS.&lt;/P&gt;&lt;P&gt;The links were helpful when determing the body for the request in Postman for RLS, however more research was required for how to apply it in our ASP.NET web app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been resolved now, thank you for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 15:32:06 GMT</pubDate>
    <dc:creator>SeSPowerBi</dc:creator>
    <dc:date>2021-03-18T15:32:06Z</dc:date>
    <item>
      <title>Power BI REST API ExportTo Bad Request</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1722986#M28390</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;My local solution&amp;nbsp;is a&amp;nbsp;&lt;SPAN&gt;Power BI ASP.NET web app registered in Azure AD using a client secret and client id (Azure service principal with a App Owns Data model). It preforms the&lt;/SPAN&gt;&amp;nbsp;Power BI REST API call "export=client.Reports.ExportToFileInGroup(workspaceid, reportid, exportRequest)" but it is catching a 400 Bad Request error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried testing &lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofileingroup" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofileingroup&lt;/A&gt;&amp;nbsp;TryIt workspace it executed the request with a 200 response using the same groupid and reportid in our Azure account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried testing &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/:groupid/reports/:reportid/ExportTo" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/:groupid/reports/:reportid/ExportTo&lt;/A&gt;&amp;nbsp;from Postman with the Bearer token retrieved from&amp;nbsp;&lt;A href="https://login.microsoftonline.com/:tenant/oauth2/token" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/:tenant/oauth2/token&lt;/A&gt;&amp;nbsp;for our Registered App (used in the local solution) within that Azure workspace, the error remains the same --Bad Request.&lt;/P&gt;&lt;P&gt;I have my header set to "Authorization: Bearer #######" and "&lt;SPAN&gt;Content-Type: application/json" to match TryIt, with the body set as "&lt;/SPAN&gt;&lt;SPAN&gt;{"&lt;/SPAN&gt;&lt;SPAN&gt;format":&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"PDF"&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I have taken the Bearer token from the TryIt workspace, and used it in the Postman call, the error persists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why is this error persisting? Has anyone delt with this call before and recieved a similar issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/2757"&gt;@PowerBI&lt;/a&gt; @ExportTo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 15:39:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1722986#M28390</guid>
      <dc:creator>SeSPowerBi</dc:creator>
      <dc:date>2021-03-15T15:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API ExportTo Bad Request</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1727012#M28420</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/290428"&gt;@SeSPowerBi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please review the solution in the following threads, hope they can help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/REST-API-for-Power-BI-Reports-Export-To-File-giving-error/td-p/985664" target="_self"&gt;&lt;STRONG&gt;REST API for Power BI, Reports - Export To File giving error&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/400-Bad-Request-Error-when-embedding-report/td-p/1060029" target="_self"&gt;&lt;STRONG&gt;&lt;SPAN&gt;400 Bad Request Error when embedding report&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Get-Reports-REST-api-not-working-Showing-400-Bad-Request/m-p/450949" target="_self"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Get Reports REST api not working - Showing 400 Bad Request&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/A&gt;(see message &lt;STRONG&gt;5&lt;/STRONG&gt; from v-jiascu-msft)&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 08:34:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1727012#M28420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-17T08:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API ExportTo Bad Request</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1730909#M28468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to use Fiddler to get more information on the error. It has to do with effective identities that needed to be provided in the body for RLS.&lt;/P&gt;&lt;P&gt;The links were helpful when determing the body for the request in Postman for RLS, however more research was required for how to apply it in our ASP.NET web app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been resolved now, thank you for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 15:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-ExportTo-Bad-Request/m-p/1730909#M28468</guid>
      <dc:creator>SeSPowerBi</dc:creator>
      <dc:date>2021-03-18T15:32:06Z</dc:date>
    </item>
  </channel>
</rss>

