<?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: secure embed using js sdk in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/849031#M21444</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure , here the documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also here is the code reference for the user owns data&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-web-app/PBIWebApp" target="_blank"&gt;https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-web-app/PBIWebApp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2019 14:24:10 GMT</pubDate>
    <dc:creator>Jayendran</dc:creator>
    <dc:date>2019-11-18T14:24:10Z</dc:date>
    <item>
      <title>secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/841506#M21340</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have used the AZURE portal to create an app that allows me to embed pbi reports on my site using the JS sdk instead of iframes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i use&lt;STRONG&gt; secure embed&lt;/STRONG&gt; for displaying reports on my web site as i did so far with "regular i-frame embedding" so the user will first have to sign in using his microsoft account in order to watch the report?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2019 10:36:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/841506#M21340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-09T10:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/844679#M21372</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the link&amp;nbsp;&lt;A href="https://powerbi.microsoft.com/en-us/blog/easily-embed-secure-power-bi-reports-in-your-internal-portals-or-websites/" target="_blank"&gt;https://powerbi.microsoft.com/en-us/blog/easily-embed-secure-power-bi-reports-in-your-internal-portals-or-websites/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which you need to look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you need any help&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 09:24:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/844679#M21372</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-11-13T09:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/849009#M21442</link>
      <description>&lt;P&gt;Thank you for your reply, by unfortunately this link is not useful&amp;nbsp;for me as i dont want to use iframe tags/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the js SDK for embedding&amp;nbsp;reports on my site....&amp;nbsp;using the js SDK i want to embed secure reports on my site (user own data) that will be visible to user only after he logs in to his Microsoft account....&amp;nbsp;does anybody have code example, i really got lost with the documentation...&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 14:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/849009#M21442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-18T14:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/849031#M21444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure , here the documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also here is the code reference for the user owns data&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-web-app/PBIWebApp" target="_blank"&gt;https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-web-app/PBIWebApp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 14:24:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/849031#M21444</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-11-18T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850140#M21467</link>
      <description>&lt;P&gt;thank you&amp;nbsp;Jayendran!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yet i am still confused about somthing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In all sample app there is .Net code, while i want to use the js sdk for embedding my reports.&lt;/P&gt;&lt;P&gt;should i create app functions on my azure portal for the .net code part?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have followed several tutorials for js embedding, in all of them it is the "app owns data" method.&lt;/P&gt;&lt;P&gt;JS on my page call a function that i created on the azure portal , so in fact every js function depends on .Net functions that run on azaure function app , as you can see on this code example:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&lt;A href="https://github.com/Dhruvinshah16/Power-BI-Embedded-Resources-Step-by-Step-Series/blob/master/Video%20Series%20-04/AzureFunctionAPP-Code.txt" target="_blank"&gt;https://github.com/Dhruvinshah16/Power-BI-Embedded-Resources-Step-by-Step-Series/blob/master/Video%20Series%20-04/AzureFunctionAPP-Code.txt&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;this example is bad for me as user is not being asked to sign in to his microsoft accont before reports is dsiplayed to him - everybody who acces my web page, even if he is not a power bi user, can see the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still dont understand how can i use simple js with the user owns data approach so:&lt;/P&gt;&lt;P&gt;1. I can make sure a pro power bi user is logged in \ ask him to lo in&lt;/P&gt;&lt;P&gt;2. Using simple js, display the user one on my reports from power bi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far i have use i-frame tags but as i want to later on interact with the report (e.g allow bookmarks) i want to switch to the js embedding&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:10:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850140#M21467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-19T10:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850184#M21471</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your github code is an example of app owns data and not User owns data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here some of the links which help full for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embedding-Basics#user-owns-the-data" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embedding-Basics#user-owns-the-data&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also got some reference from&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/get-Access-token-using-js/td-p/350294" target="_blank"&gt;https://community.powerbi.com/t5/Developer/get-Access-token-using-js/td-p/350294&lt;/A&gt;&amp;nbsp;which helps you to implement the entier in HTML&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;

&amp;lt;html lang="en"&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;meta charset="utf-8" /&amp;gt;
        &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
		
       &amp;lt;script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.12/js/adal.min.js"&amp;gt;&amp;lt;/script&amp;gt;
	   &amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
			 &amp;lt;script&amp;gt;
			  window.config  = {
				  instance: 'https://login.microsoftonline.com/',
				  tenant: 'common', //COMMON OR YOUR TENANT ID

				  clientId: '49df1bc7-db68-4fb4-91c0-6d93f770d1a4', //This is your client ID
				  redirectUri: 'https://login.live.com/oauth20_desktop.srf', //This is your redirect URI

				  callback: userSignedIn,
				  popUp: true
			  };
			  
			  var ADAL = new AuthenticationContext(config);

				function signIn() {
				      ADAL.login();
				  }
				
				  function userSignedIn(err, token) {
				      console.log('userSignedIn called');
				      if (!err) {
                				          
                  showWelcomeMessage();
				  
				  ADAL.acquireToken("https://analysis.windows.net/powerbi/api", function (error, token) {

            // Handle ADAL Error
            if (error || !token) {
                printErrorMessage('ADAL Error Occurred: ' + error);
                return;
            }

            // Get TodoList Data
            $.ajax({
                type: "GET",
                url: "https://api.powerbi.com/v1.0/myorg/datasets",
                headers: {
                    'Authorization': 'Bearer ' + token,
                },
            }).done(function (data) {

               
                console.log(data);

                    

                // Update the UI
                $loading.hide();
               

            }).fail(function () {
                printErrorMessage('Error getting todo list data')
            }).always(function () {

                // Register Handlers for Buttons in Data Table
                registerDataClickHandlers();
            });
        });
				      }
				      else {
				          console.error("error: " + err);
				      }
				  }
				  
				  
				  
				  
				  function getDataSets(){
				   
						      
                  var trythis = "Bearer " + token;
    							var request = new XMLHttpRequest();

                  request.open('GET', 'https://api.powerbi.com/v1.0/myorg/datasets');
                  
                  request.setRequestHeader('Authorization', trythis);
                  
                  request.onreadystatechange = function () {
                    if (this.readyState === 4) {
                      console.log('Status:', this.status);
                      console.log('Body:', this.responseText);
                    }
                  };
                  
                  request.send();
				  
				  
				  }
				  
				  
				  
				
				  function showWelcomeMessage() {
				      var user = ADAL.getCachedUser();
				      var divWelcome = document.getElementById('WelcomeMessage');
				      divWelcome.innerHTML = "Welcome " + user.profile.name;
				  }
        &amp;lt;/script&amp;gt;

    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        
        
			 &amp;lt;button id="SignIn" onclick="signIn()"&amp;gt;Sign In&amp;lt;/button&amp;gt;
			 &amp;lt;h4 id="WelcomeMessage"&amp;gt;&amp;lt;/h4&amp;gt;	
             
      
             
             
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not but not lease read the official document before implementation for clear understanding&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-your-organization&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:44:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850184#M21471</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-11-19T10:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850199#M21472</link>
      <description>&lt;P&gt;Also, i have followed this toturial:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-spa" target="_blank"&gt;https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-spa&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i sucsefuly managed to us js, sign in the user to his microsoft account and get a token,&lt;/P&gt;&lt;P&gt;but i dont find anything regarding how should i use the tiken i got and embed a power bi report using js....&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 11:08:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850199#M21472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-19T11:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850210#M21473</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok now you got the access token. You can pass the token to the PowerBI JS like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var models = window['powerbi-client'].models;

var embedConfiguration = {
	type: 'report',
	id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
	embedUrl: 'https://app.powerbi.com/reportEmbed',
	tokenType: models.TokenType.Aad,
	accessToken: 'e4...rf' 
};

var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 11:20:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850210#M21473</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-11-19T11:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850379#M21477</link>
      <description>&lt;P&gt;1, First of all thank you for your reply, I really appreciate that!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have try to include this code (powerbi.embed call) but for some reason i see an error on the console regarding the "models" variable (&lt;SPAN&gt;&lt;FONT color="#ff0000"&gt;Uncaught TypeError: Cannot read property 'models' of undefined&lt;/FONT&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i also declared theses dependencies:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;&amp;lt;script src="&lt;A href="https://community.fabric.microsoft.com/" target="_blank"&gt;https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&amp;lt;script src="&lt;A href="https://community.fabric.microsoft.com/" target="_blank"&gt;https://secure.aadcdn.microsoftonline-p.com/lib/1.0.0/js/msal.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&amp;lt;script src="&lt;A href="https://community.fabric.microsoft.com/" target="_blank"&gt;https://raw.githubusercontent.com/microsoft/PowerBI-JavaScript/master/dist/powerbi.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;// load embed report"&lt;BR /&gt;&lt;BR /&gt;// Get models. models contains enums that can be used.&lt;BR /&gt;var models = window['powerbi-client'].models;&lt;BR /&gt;&lt;BR /&gt;var embedConfiguration = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;id: '8977c9ed-bd54-42a2-9f0c-291cd3469755'--&amp;gt; &lt;FONT color="#9900ff"&gt;&lt;I&gt;the report id,&lt;/I&gt;&lt;/FONT&gt;&lt;BR /&gt;embedUrl: '&lt;A href="https://app.powerbi.com/reportEmbed" target="_blank"&gt;https://app.powerbi.com/reportEmbed&lt;/A&gt;',&lt;BR /&gt;tokenType: models.TokenType.Aad,&lt;BR /&gt;accessToken: &lt;FONT color="#9900ff"&gt;'bc182855-dc03-431e-8d21-ad64be2b4de2' --&amp;gt;&lt;I&gt; the token i got from the JSON response&amp;nbsp;&lt;/I&gt;&lt;/FONT&gt;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;var $reportContainer = $('#reportContainer');&lt;BR /&gt;console.log("$reportContainer", $reportContainer);&lt;BR /&gt;var report = powerbi.embed($reportContainer.get(0), embedConfiguration);&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me what have i been missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:52:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850379#M21477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-19T13:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850418#M21478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try the below solution&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/a/49255085" target="_blank"&gt;https://stackoverflow.com/a/49255085&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$(document).ready(function () {

        // Get models. models contains enums that can be used.
        var models = powerbi.models; // or window.powerbi.models

        var embedConfiguration = {
            type: 'dashboard',
            id: 'dashboardID',
            embedUrl: 'https://app.powerbi.com/dashboardEmbed',
            tokenType: models.TokenType.Aad,
            accessToken: 'TokenString'
        };

        var $dashboardContainer = $('#embedContainer');
        var dashboard = powerbi.embed($dashboardContainer.get(0), embedConfiguration);
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please don't forget to give kudo's or Thumbup for the replay which you got useful.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:10:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/850418#M21478</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-11-19T14:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/852979#M21507</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;I'm still getting undifined, it's like the powerbi.js library is not there...&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;jquery.min.js:2 Uncaught ReferenceError: powerbi is not defined&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;yet in the head tag i call the script and i can see that the power bi js script loads to my page :&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&amp;lt;head&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;title&amp;gt;Quickstart for MSAL JS&amp;lt;/title&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://secure.aadcdn.microsoftonline-p.com/lib/1.0.0/js/msal.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;script src="&lt;STRONG&gt;&lt;A href="https://raw.githubusercontent.com/microsoft/PowerBI-JavaScript/master/dist/powerbi.js" target="_blank" rel="noopener"&gt;https://raw.githubusercontent.com/microsoft/PowerBI-JavaScript/master/dist/powerbi.js&lt;/A&gt;&lt;/STRONG&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;&amp;lt;/head&amp;gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;but when i try to console "powerbi" or "window['powerbi-client']" i get an undifineied error in the console...&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/852979#M21507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-21T13:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: secure embed using js sdk</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/853018#M21508</link>
      <description>&lt;P&gt;Looks like the problem was with the powerbi.js script call,&lt;/P&gt;&lt;P&gt;when i downloaded the script and added it to the page directly the issue was resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But (of curse) i am facing another issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the powerbi.js try to embed and load the i-frame i get a "This content isn't available" error message inside the i frame.&lt;/P&gt;&lt;P&gt;Also the iframe element url is being set to "&lt;SPAN&gt;&lt;A href="https://app.powerbi.com/reportEmbed" target="_blank" rel="noopener"&gt;https://app.powerbi.com/reportEmbed&lt;/A&gt;?&lt;STRONG&gt;uid=l6rvc&lt;/STRONG&gt;&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have triple checked that i use the correct access token and report id&lt;/STRONG&gt; yet still i'm not able to load the report.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&lt;STRONG&gt;I have also added the power bi js debuggind tool (&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Troubleshooting-and-debugging-of-embedded-parts" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Troubleshooting-and-debugging-of-embedded-parts&lt;/A&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;i get this error after trying to emmbed a report using powerbi.embed() function:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;code 403 &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;error message :&amp;nbsp;"LoadReportFailed"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;detailedMessage: "Fail to initialize - Could not resolve cluster"&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/210953i3EBC63A91B7CC87B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/210941iC63281C27261DF48/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;I have also change the token type from&lt;STRONG&gt; Aad&lt;/STRONG&gt; to&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Embed&lt;/STRONG&gt; but it didnt make any different.&lt;/DIV&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;is there another way to check what am i doing wrong here?, maybe a missing setting in the azure app? (i added all the nedd permissions to my azure app)&lt;/DIV&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail-mceNonEditable gmail-lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:32:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/secure-embed-using-js-sdk/m-p/853018#M21508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-21T13:32:54Z</dc:date>
    </item>
  </channel>
</rss>

