<?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 Embed Power BI using restful API  error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1288529#M25203</link>
    <description>&lt;P&gt;I am using restful API to embed a dashboard, but I am getting the following error while the frame is loaded in the browser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uncaught Error: Report id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute 'powerbi-report-id'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the portion of code on&amp;nbsp;&lt;SPAN class="s1"&gt;pbiembedservice.py&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Get embed token

        # embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/GenerateToken'

        embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/groups/ceaa1d50-6123-47b3-98ce-0aedf7c14141/dashboards/9a43729e-9912-4ca7-adfe-c91498e91d7e/tiles/ea3d500d-2a18-41fc-ac7d-a6209b6a7c18/GenerateToken'

        body = {'datasets': []}

        if datasetId != '':

            body['datasets'].append({'id': datasetId})



        if app.config['REPORT_ID'] != '':

            body['reports'] = []

            #body['reports'].append({'id': reportId})

            body['reports'].append({'id': app.config['REPORT_ID']})



        if app.config['WORKSPACE_ID'] != '':

            body['targetWorkspaces'] = []

            body['targetWorkspaces'].append({'id': app.config['WORKSPACE_ID']})



        apiresponse = None



        try:



            # Generate Embed token for multiple workspaces, datasets, and reports. Refer https://aka.ms/MultiResourceEmbedToken

            print(body)

            print(embedtokenurl)

            #apiresponse = requests.post(reporturl, data=json.dumps(body), headers=headers)

            apiresponse = requests.post(embedtokenurl, data=json.dumps(body), headers=headers)&lt;/LI-CODE&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 19:21:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-11T19:21:59Z</dc:date>
    <item>
      <title>Embed Power BI using restful API  error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1288529#M25203</link>
      <description>&lt;P&gt;I am using restful API to embed a dashboard, but I am getting the following error while the frame is loaded in the browser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uncaught Error: Report id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute 'powerbi-report-id'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the portion of code on&amp;nbsp;&lt;SPAN class="s1"&gt;pbiembedservice.py&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Get embed token

        # embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/GenerateToken'

        embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/groups/ceaa1d50-6123-47b3-98ce-0aedf7c14141/dashboards/9a43729e-9912-4ca7-adfe-c91498e91d7e/tiles/ea3d500d-2a18-41fc-ac7d-a6209b6a7c18/GenerateToken'

        body = {'datasets': []}

        if datasetId != '':

            body['datasets'].append({'id': datasetId})



        if app.config['REPORT_ID'] != '':

            body['reports'] = []

            #body['reports'].append({'id': reportId})

            body['reports'].append({'id': app.config['REPORT_ID']})



        if app.config['WORKSPACE_ID'] != '':

            body['targetWorkspaces'] = []

            body['targetWorkspaces'].append({'id': app.config['WORKSPACE_ID']})



        apiresponse = None



        try:



            # Generate Embed token for multiple workspaces, datasets, and reports. Refer https://aka.ms/MultiResourceEmbedToken

            print(body)

            print(embedtokenurl)

            #apiresponse = requests.post(reporturl, data=json.dumps(body), headers=headers)

            apiresponse = requests.post(embedtokenurl, data=json.dumps(body), headers=headers)&lt;/LI-CODE&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 19:21:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1288529#M25203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-11T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI using restful API  error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1288840#M25204</link>
      <description>&lt;P&gt;You are trying to embed a dashboard. Is that your intention?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 23:56:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1288840#M25204</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-11T23:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI using restful API  error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1290595#M25209</link>
      <description>&lt;P&gt;Yes. You are right, I am trying to embed dashboard into website.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 13:34:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1290595#M25209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-12T13:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI using restful API  error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1291062#M25212</link>
      <description>&lt;P&gt;why? What's the rationale for that?&amp;nbsp; Dashboards and dashboard tiles are not interactive. You don't really want to do that.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 16:15:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1291062#M25212</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-12T16:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI using restful API  error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1291105#M25214</link>
      <description>&lt;P&gt;Ok You mean the visuals we pin to make a dashboard are not interactive? Then If I want to combine visuals/report from multiple dataset how could I do that in powerBI? I know in the reports visuals are interactive, so do you suggest to make reports with multiple visuals?&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 16:28:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-using-restful-API-error/m-p/1291105#M25214</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-12T16:28:14Z</dc:date>
    </item>
  </channel>
</rss>

