<?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 Rest API Export Report to PDF that uses Azure Analysis Service as a data set in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Rest-API-Export-Report-to-PDF-that-uses-Azure-Analysis-Service/m-p/1133666#M23967</link>
    <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;I'm using the Rest API Call : POST &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully export a pdf report if the data is stored in PowerBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to export a report to PDF that uses Analysis Service as it's Data Source&lt;BR /&gt;I then get the following Error : Export report requires effective identity to be provided for the report's data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have set up :&lt;BR /&gt;1. Premier Workspace where the PowerBI report is published&lt;BR /&gt;2. Followed the instructions to create a service principal and add it to power bi : &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal&lt;/A&gt;&lt;BR /&gt;3. The Service Principal has been added to the Azure Analysis Service Server as an Administrator&lt;BR /&gt;4. The Service Principal has been added to the Azure Analysis Service Database to a Role that has admin rights&lt;BR /&gt;5. Generate a Oauth Token :&lt;/P&gt;&lt;P&gt;grant_type:client_credentials&lt;BR /&gt;client_id: {My Client ID Generated in step 1}&lt;BR /&gt;client_secret:{Client Secret Generated in Step 1}&lt;BR /&gt;scope:openid&lt;BR /&gt;resource:&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;6. Use the token received to call the Rest API Post Action : &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there something else that needs to be done in order to allow the generation of the pdf when the data set is from a analysis service database ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2020 15:51:42 GMT</pubDate>
    <dc:creator>Armand_Theron</dc:creator>
    <dc:date>2020-06-01T15:51:42Z</dc:date>
    <item>
      <title>Rest API Export Report to PDF that uses Azure Analysis Service as a data set</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Rest-API-Export-Report-to-PDF-that-uses-Azure-Analysis-Service/m-p/1133666#M23967</link>
      <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;I'm using the Rest API Call : POST &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully export a pdf report if the data is stored in PowerBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to export a report to PDF that uses Analysis Service as it's Data Source&lt;BR /&gt;I then get the following Error : Export report requires effective identity to be provided for the report's data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have set up :&lt;BR /&gt;1. Premier Workspace where the PowerBI report is published&lt;BR /&gt;2. Followed the instructions to create a service principal and add it to power bi : &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal&lt;/A&gt;&lt;BR /&gt;3. The Service Principal has been added to the Azure Analysis Service Server as an Administrator&lt;BR /&gt;4. The Service Principal has been added to the Azure Analysis Service Database to a Role that has admin rights&lt;BR /&gt;5. Generate a Oauth Token :&lt;/P&gt;&lt;P&gt;grant_type:client_credentials&lt;BR /&gt;client_id: {My Client ID Generated in step 1}&lt;BR /&gt;client_secret:{Client Secret Generated in Step 1}&lt;BR /&gt;scope:openid&lt;BR /&gt;resource:&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;6. Use the token received to call the Rest API Post Action : &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there something else that needs to be done in order to allow the generation of the pdf when the data set is from a analysis service database ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 15:51:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Rest-API-Export-Report-to-PDF-that-uses-Azure-Analysis-Service/m-p/1133666#M23967</guid>
      <dc:creator>Armand_Theron</dc:creator>
      <dc:date>2020-06-01T15:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API Export Report to PDF that uses Azure Analysis Service as a data set</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Rest-API-Export-Report-to-PDF-that-uses-Azure-Analysis-Service/m-p/1153315#M24118</link>
      <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Just an update on the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; It seems to pass the effective identity one needs to add the following into the body :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "format": "pdf",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "powerBIReportConfiguration": {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "identities": [&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "username": "{ ServicePrincipal Object ID }",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "roles": [&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "{Role in AAS}"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "datasets": [&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "{datasetID}"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Just also note as per the MS documentation that one needs to pass in the&amp;nbsp;Service Principal object id and not the service&amp;nbsp;ServicePrincipal app id&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 14:38:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Rest-API-Export-Report-to-PDF-that-uses-Azure-Analysis-Service/m-p/1153315#M24118</guid>
      <dc:creator>Armand_Theron</dc:creator>
      <dc:date>2020-06-11T14:38:55Z</dc:date>
    </item>
  </channel>
</rss>

