<?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: powerBI embedded : embeding report using javascript API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/69823#M2294</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/14271"&gt;@milangarg﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know there is a &lt;A href="http://azure-samples.github.io/powerbi-angular-client" target="_self"&gt;demo&lt;/A&gt; about how to consume Power BI API and render using angular components, as well as its source &lt;A href="https://github.com/Azure-Samples/powerbi-angular-client" target="_blank"&gt;https://github.com/Azure-Samples/powerbi-angular-client&lt;/A&gt;. You may also reach out for help there.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2016 06:41:46 GMT</pubDate>
    <dc:creator>v-chuncz-msft</dc:creator>
    <dc:date>2016-09-20T06:41:46Z</dc:date>
    <item>
      <title>powerBI embedded : embeding report using javascript API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/68903#M2254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have uploaded .pbix reports to workspaces on azure&lt;/P&gt;&lt;P&gt;We are generating a accesskey at run time and passing the values in a JSON format to PowerBI Angular SDK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when the API tries to load the report it gets the following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wabi-south-east-asia-redirect.analysis.windows.net/metadata/cluster" target="_blank"&gt;https://wabi-south-east-asia-redirect.analysis.windows.net/metadata/cluster&lt;/A&gt; 401 (Unauthorized)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our Azure account is in South Central US &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are sending all the values back from our .NET MVC controller to our HTML page as show below&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;var&lt;/SPAN&gt; embedConfiguration &lt;SPAN class="pl-k"&gt;=&lt;/SPAN&gt; {
    type&lt;SPAN class="pl-k"&gt;:&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;report&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;,
    accessToken&lt;SPAN class="pl-k"&gt;:&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;eyJ0eXAiO...Qron7qYpY9MI&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;,
    id&lt;SPAN class="pl-k"&gt;:&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;5dac7a4a-4452-46b3-99f6-a25915e0fe55&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;,
    embedUrl&lt;SPAN class="pl-k"&gt;:&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;https://embedded.powerbi.com/appTokenReportEmbed&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;
};
&lt;SPAN class="pl-k"&gt;var&lt;/SPAN&gt; $reportContainer &lt;SPAN class="pl-k"&gt;=&lt;/SPAN&gt; &lt;SPAN class="pl-en"&gt;$&lt;/SPAN&gt;(&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;#reportContainer&lt;SPAN class="pl-pds"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;);
&lt;SPAN class="pl-k"&gt;var&lt;/SPAN&gt; report &lt;SPAN class="pl-k"&gt;=&lt;/SPAN&gt; &lt;SPAN class="pl-smi"&gt;powerbi&lt;/SPAN&gt;.&lt;SPAN class="pl-en"&gt;embed&lt;/SPAN&gt;(&lt;SPAN class="pl-smi"&gt;$reportContainer&lt;/SPAN&gt;.&lt;SPAN class="pl-c1"&gt;get&lt;/SPAN&gt;(&lt;SPAN class="pl-c1"&gt;0&lt;/SPAN&gt;), embedConfiguration);&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Sep 2016 08:00:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/68903#M2254</guid>
      <dc:creator>milangarg</dc:creator>
      <dc:date>2016-09-16T08:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: powerBI embedded : embeding report using javascript API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/69435#M2273</link>
      <description>&lt;P&gt;I tried using the report id in the sample provided with the following code&lt;/P&gt;&lt;P&gt;@model ProvisionPower.Models.UserLogin&lt;BR /&gt;@{&lt;BR /&gt;Layout = null;&lt;BR /&gt;ViewBag.Title = "SignIn | Helios Data";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html lang="en"&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;@ViewBag.Title&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;meta name="description" content="User login page" /&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;!--&amp;lt;script src="&lt;A href="https://community.fabric.microsoft.com/" target="_blank"&gt;https://npmcdn.com/powerbi-client@2.0.0"&amp;gt;&amp;lt;/script&amp;gt;--&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;!--&amp;lt;script src="&lt;A href="https://community.fabric.microsoft.com/" target="_blank"&gt;https://npmcdn.com/angular-powerbi@1.0.0"&amp;gt;&amp;lt;/script&amp;gt;--&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;!-- &amp;lt;div powerbi-type="report"&lt;BR /&gt;powerbi-access-token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IkFDTUUtQ29ycG9yYXRpb24iLCJ3aWQiOiJiZTFjMjUzZi02NTliLTQ5MjUtODE5ZS0xODhlNDhjYWU0ZDYiLCJyaWQiOiI3ODI1ZTE2ZC1iMDk3LTQzZmUtOTg2ZC1mYjQ5Mjg4NmU4MjkiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTQ3NDA0NTg5OSwibmJmIjoxNDc0MDQyMjk5fQ.BBowpDOenhf-IUX7DlGut2Bzel7V1JuqpYXMw3p5pP0"&lt;BR /&gt;powerbi-report-id="7825e16d-b097-43fe-986d-fb492886e829"&lt;BR /&gt;powerbi-embed-url="&lt;A href="https://embedded.powerbi.com/appTokenReportEmbed" target="_blank"&gt;https://embedded.powerbi.com/appTokenReportEmbed&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;--&amp;gt;&lt;BR /&gt;&amp;lt;div id="reportContainer2"&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="reportContainer3" &amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script src="~/Scripts/powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="~/Scripts/jquery-1.10.2.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="~/Scripts/fetch.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="~/Scripts/es6-promise.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;var allReportsUrl = '&lt;A href="https://powerbiembedapi.azurewebsites.net/api/reports/c52af8ab-0468-4165-92af-dc39858d66ad" target="_blank"&gt;https://powerbiembedapi.azurewebsites.net/api/reports/c52af8ab-0468-4165-92af-dc39858d66ad&lt;/A&gt;';&lt;BR /&gt;var $dynamicReportContainer = $('#reportContainer2');&lt;BR /&gt;fetch(allReportsUrl)&lt;BR /&gt;.then(function (response) {&lt;BR /&gt;if (response.ok) {&lt;BR /&gt;return response.json()&lt;BR /&gt;.then(function (embedConfig) {&lt;BR /&gt;return powerbi.embed($dynamicReportContainer.get(0), embedConfig);&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return response.json()&lt;BR /&gt;.then(function (error) {&lt;BR /&gt;throw new Error(error);&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still I get redirected to the south east cluster and I get an error message 403&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then tried embeding my report using the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var embedConfiguration = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;accessToken: '3aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTQ3NDIwMTc4NiwibmJmIjoxNDc0MTk4MTg2fQ.rWqR3hSqieMAeAjxPcTnHfwJkuP2-X2G9FBt08o9R5w',&lt;BR /&gt;id: '7825e16d-b097-43fe-986d-fb492886e829',&lt;BR /&gt;webUrl:"&lt;A href="https://app.powerbi.com/reports/7825e16d-b097-43fe-986d-fb492886e829" target="_blank"&gt;https://app.powerbi.com/reports/7825e16d-b097-43fe-986d-fb492886e829&lt;/A&gt;",&lt;BR /&gt;embedUrl: '&lt;A href="https://embedded.powerbi.com/appTokenReportEmbed?reportId=7825e16d-b097-43fe-986d-fb492886e829" target="_blank"&gt;https://embedded.powerbi.com/appTokenReportEmbed?reportId=7825e16d-b097-43fe-986d-fb492886e829&lt;/A&gt;'&lt;BR /&gt;};&lt;BR /&gt;var $reportContainer = $('#reportContainer2');&lt;BR /&gt;var report = window.powerbi.embed($reportContainer.get(0), embedConfiguration);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still I get the same error 403&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 07:32:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/69435#M2273</guid>
      <dc:creator>milangarg</dc:creator>
      <dc:date>2016-09-19T07:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: powerBI embedded : embeding report using javascript API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/69823#M2294</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/14271"&gt;@milangarg﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know there is a &lt;A href="http://azure-samples.github.io/powerbi-angular-client" target="_self"&gt;demo&lt;/A&gt; about how to consume Power BI API and render using angular components, as well as its source &lt;A href="https://github.com/Azure-Samples/powerbi-angular-client" target="_blank"&gt;https://github.com/Azure-Samples/powerbi-angular-client&lt;/A&gt;. You may also reach out for help there.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 06:41:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/69823#M2294</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2016-09-20T06:41:46Z</dc:date>
    </item>
    <item>
      <title>powerBI embedded : embeding report using javascript API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/119962#M4136</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/14271"&gt;@milangarg&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you solve the issue? I am also facing same error. Any idea how to solve it?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2017 15:32:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/powerBI-embedded-embeding-report-using-javascript-API/m-p/119962#M4136</guid>
      <dc:creator>BicgAnupama</dc:creator>
      <dc:date>2017-01-29T15:32:20Z</dc:date>
    </item>
  </channel>
</rss>

