<?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 Getting an error while loading the dashboard embedurl in iframe. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-an-error-while-loading-the-dashboard-embedurl-in-iframe/m-p/102104#M3543</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to display power bi dashboard in my web app by its embedUrl using power bi API service. But i am getting an error as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/23246iECA5FA5F7A1F9F12/image-size/large?v=v2&amp;amp;px=999" role="button" title="dashboard.png" alt="dashboard.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the api method and javascript code used to get the dashboard list &amp;amp; load the embed url to iframe:&lt;BR /&gt;&lt;BR /&gt;API method to get all dashboard details :&amp;nbsp;&lt;SPAN class="destinationProtocol"&gt;https://&lt;/SPAN&gt;&lt;SPAN class="destinationHost"&gt;api.powerbi.com&lt;/SPAN&gt;&lt;SPAN class="destinationUriTemplate"&gt;&lt;SPAN class="uriTemplate"&gt;&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;beta&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;myorg&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;dashboards which gives the output as&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="line"&gt;&lt;SPAN class="token string oneLine"&gt;"value"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"id"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"2C0CCF12-A369-4985-A643-0995C249D5B9"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"displayName"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"Music",&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;      "isReadOnly":"false",&lt;BR /&gt;      "embedUrl":"https://app.powerbi.com/dashboardEmbed?dashboardId=bbce58ae-d007-428a-b3ea-c092ea04dfcb"
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"id"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"C446840B-94AD-4B23-8896-C276E69B8FAA"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"displayName"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"SalesMarketing",&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;      "isReadOnly":"false",&lt;BR /&gt;      "embedUrl":"https://app.powerbi.com/dashboardEmbed?dashboardId=bbce58ae-d007-428a-b3ea-c092ea04dfcb"
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;  &lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JavaScript code load embed url to iframe:&lt;/P&gt;&lt;P&gt;// dashboards (variable) is an array of string which contains embedUrl.&lt;BR /&gt;window.onload = function () {&lt;BR /&gt;if ("" != accessToken) {&lt;BR /&gt;var iframe = document.getElementById('iFrameDashboard');&lt;/P&gt;&lt;P&gt;// To load a tile do the following:&lt;BR /&gt;// Set the IFrame source to the EmbedUrl from the Get Tiles operation&lt;BR /&gt;iframe.src=&lt;SPAN&gt;dashboards[0].&lt;/SPAN&gt;embedURL;&lt;/P&gt;&lt;P&gt;// Add an onload handler to submit the access token&lt;BR /&gt;iframe.onload = postActionLoadTile;&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;function postActionLoadTile() {&lt;/P&gt;&lt;P&gt;// Construct the push message structure&lt;BR /&gt;// This is where you assign the Access Token to get access to the tile visual&lt;BR /&gt;var messageStructure = {&lt;BR /&gt;action: "loadDashboard",&lt;BR /&gt;accessToken: accessToken,&lt;BR /&gt;height: 500,&lt;BR /&gt;width: 500&lt;BR /&gt;};&lt;BR /&gt;message = JSON.stringify(messageStructure);&lt;/P&gt;&lt;P&gt;// Push the message&lt;BR /&gt;document.getElementById('&lt;SPAN&gt;iFrameDashboard&lt;/SPAN&gt;').contentWindow.postMessage(message, "*");;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my web page its appearing as below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard output.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/23248iAD1440804089F34F/image-size/large?v=v2&amp;amp;px=999" role="button" title="dashboard output.png" alt="dashboard output.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me out in resolving above mentioned issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2016 07:15:13 GMT</pubDate>
    <dc:creator>mohankumarc143</dc:creator>
    <dc:date>2016-12-14T07:15:13Z</dc:date>
    <item>
      <title>Getting an error while loading the dashboard embedurl in iframe.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-an-error-while-loading-the-dashboard-embedurl-in-iframe/m-p/102104#M3543</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to display power bi dashboard in my web app by its embedUrl using power bi API service. But i am getting an error as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/23246iECA5FA5F7A1F9F12/image-size/large?v=v2&amp;amp;px=999" role="button" title="dashboard.png" alt="dashboard.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the api method and javascript code used to get the dashboard list &amp;amp; load the embed url to iframe:&lt;BR /&gt;&lt;BR /&gt;API method to get all dashboard details :&amp;nbsp;&lt;SPAN class="destinationProtocol"&gt;https://&lt;/SPAN&gt;&lt;SPAN class="destinationHost"&gt;api.powerbi.com&lt;/SPAN&gt;&lt;SPAN class="destinationUriTemplate"&gt;&lt;SPAN class="uriTemplate"&gt;&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;beta&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;myorg&lt;SPAN class="uriTemplateSlash"&gt;/&lt;/SPAN&gt;dashboards which gives the output as&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="line"&gt;&lt;SPAN class="token string oneLine"&gt;"value"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"id"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"2C0CCF12-A369-4985-A643-0995C249D5B9"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"displayName"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"Music",&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;      "isReadOnly":"false",&lt;BR /&gt;      "embedUrl":"https://app.powerbi.com/dashboardEmbed?dashboardId=bbce58ae-d007-428a-b3ea-c092ea04dfcb"
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"id"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"C446840B-94AD-4B23-8896-C276E69B8FAA"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;      &lt;SPAN class="token string oneLine"&gt;"displayName"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token string oneLine"&gt;"SalesMarketing",&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;      "isReadOnly":"false",&lt;BR /&gt;      "embedUrl":"https://app.powerbi.com/dashboardEmbed?dashboardId=bbce58ae-d007-428a-b3ea-c092ea04dfcb"
&lt;SPAN class="line"&gt;    &lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;  &lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JavaScript code load embed url to iframe:&lt;/P&gt;&lt;P&gt;// dashboards (variable) is an array of string which contains embedUrl.&lt;BR /&gt;window.onload = function () {&lt;BR /&gt;if ("" != accessToken) {&lt;BR /&gt;var iframe = document.getElementById('iFrameDashboard');&lt;/P&gt;&lt;P&gt;// To load a tile do the following:&lt;BR /&gt;// Set the IFrame source to the EmbedUrl from the Get Tiles operation&lt;BR /&gt;iframe.src=&lt;SPAN&gt;dashboards[0].&lt;/SPAN&gt;embedURL;&lt;/P&gt;&lt;P&gt;// Add an onload handler to submit the access token&lt;BR /&gt;iframe.onload = postActionLoadTile;&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;function postActionLoadTile() {&lt;/P&gt;&lt;P&gt;// Construct the push message structure&lt;BR /&gt;// This is where you assign the Access Token to get access to the tile visual&lt;BR /&gt;var messageStructure = {&lt;BR /&gt;action: "loadDashboard",&lt;BR /&gt;accessToken: accessToken,&lt;BR /&gt;height: 500,&lt;BR /&gt;width: 500&lt;BR /&gt;};&lt;BR /&gt;message = JSON.stringify(messageStructure);&lt;/P&gt;&lt;P&gt;// Push the message&lt;BR /&gt;document.getElementById('&lt;SPAN&gt;iFrameDashboard&lt;/SPAN&gt;').contentWindow.postMessage(message, "*");;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my web page its appearing as below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashboard output.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/23248iAD1440804089F34F/image-size/large?v=v2&amp;amp;px=999" role="button" title="dashboard output.png" alt="dashboard output.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me out in resolving above mentioned issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:15:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-an-error-while-loading-the-dashboard-embedurl-in-iframe/m-p/102104#M3543</guid>
      <dc:creator>mohankumarc143</dc:creator>
      <dc:date>2016-12-14T07:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error while loading the dashboard embedurl in iframe.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-an-error-while-loading-the-dashboard-embedurl-in-iframe/m-p/102686#M3568</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/18056"&gt;@mohankumarc143﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The getdashboard api is for &lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-tile/" target="_self"&gt;embedding a dashboard tile&lt;/A&gt;. As of now, a dashboard can't be embeded. You can check this idea &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="" href="https://ideas.powerbi.com/forums/268152-developer-apis/suggestions/8528704-allow-powerbi-dashboards-to-be-embedded-via-iframe" target="_self" rel="nofollow noopener noreferrer"&gt;Allow PowerBI dashboards to be embedded via iframe&lt;/A&gt; &amp;nbsp;and vote it up.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 07:11:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-an-error-while-loading-the-dashboard-embedurl-in-iframe/m-p/102686#M3568</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2016-12-15T07:11:57Z</dc:date>
    </item>
  </channel>
</rss>

