<?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: Embed Power BI report in web application in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201884#M6441</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for response. That is a serious issue and makes the new API way less powerfull then the old embedded system. Not to say useless in a multi tenant environment.&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6971" data-lia-user-login="Eric_Zhang" class="lia-mention lia-mention-user"&gt;Eric_Zhang&lt;/a&gt;&amp;nbsp;hope the RLS feature comes soon :)&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2017 07:08:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-27T07:08:23Z</dc:date>
    <item>
      <title>Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/199371#M6377</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some questions regarding showing Power BI reports in a custom web application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The web application is based on an ASP.NET 4.6/ASP.NET identity, (claims aware) and the users authenticate with an AD FS server.&lt;BR /&gt;(Both onprem Active Directory and other non Active Directory IDP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Is it possible to publish an embedded Power BI report in the web application, and show data based on the logged in user identity?&lt;/P&gt;&lt;P&gt;- If this is possible, does the users of the web application need any Power BI licens?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Jonas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 11:04:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/199371#M6377</guid>
      <dc:creator>Ncedia</dc:creator>
      <dc:date>2017-06-22T11:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/200124#M6383</link>
      <description>&lt;P&gt;You can use the username() function in the DAX statement and pass the username via the token. AFAIK a Power BI Premium subscription is needed for that. The user of your application it self does not need any subscription for that. See also&amp;nbsp;&lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/#embedding-with-non-power-bi-users" target="_blank"&gt;https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/#embedding-with-non-power-bi-users&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/200124#M6383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-23T07:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/200588#M6401</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="33769" data-lia-user-login="Ncedia" class="lia-mention lia-mention-user"&gt;Ncedia&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some questions regarding showing Power BI reports in a custom web application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The web application is based on an ASP.NET 4.6/ASP.NET identity, (claims aware) and the users authenticate with an AD FS server.&lt;BR /&gt;(Both onprem Active Directory and other non Active Directory IDP).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Is it possible to publish an embedded Power BI report in the web application, and show data based on the logged in user identity?&lt;/P&gt;
&lt;P&gt;- If this is possible, does the users of the web application need any Power BI licens?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best regards!&lt;/P&gt;
&lt;P&gt;/Jonas&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="33769" data-lia-user-login="Ncedia" class="lia-mention lia-mention-user"&gt;Ncedia&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Two options.&lt;/P&gt;
&lt;P&gt;With license, you can use &lt;A title="" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/#embedding-with-power-bi-users" target="_self" rel="nofollow noopener noreferrer"&gt;Embedding with Power BI users&lt;/A&gt;&amp;nbsp;and set &lt;A title="" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/" target="_self" rel="nofollow noopener noreferrer"&gt;Power BI Row Level Security&lt;/A&gt;&amp;nbsp;or either use filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without license, you'll have to use &lt;A title="" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/#embedding-with-power-bi-users" target="_self" rel="nofollow noopener noreferrer noopener noreferrer"&gt;Embedding with non-Power BI users&lt;/A&gt;. As to filter or using RLS, RLS used to work for the &lt;A title="" href="https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-rls" target="_self" rel="nofollow noopener noreferrer noopener noreferrer"&gt;old embedding model&lt;/A&gt;(deprecated), for the new model, the RLS feature is on the roadmap and would be released in next quarter. So at this moment, use &lt;A title="" href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_self" rel="nofollow noopener noreferrer noopener noreferrer"&gt;filter in the Power BI Javascript API&lt;/A&gt; can be the only workaround. See a demo below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

 &amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;
 
&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () { &lt;BR /&gt;
var users= ["user1"]; //get the client name with javascript from your page

 var  Filter = {
   $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Table",
    column: "username"
  },  
      operator: "Contains",
      values: users
     
	 
} 
    // Read embed application token from Model
    var accessToken = "H4sIAAAAAAAEAB2 xxxxx     uCwAA";

    // Read embed URL from Model
    var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=1f1d9145-738a-4d20-ab5b-1236b283e942&amp;amp;groupId=73e1a3c6-08c4-4651-aa04-2bb701a573c7";

    // Read report Id from Model
    var embedReportId = "1f1d9145-738a-4d20-ab5b-1236b283e942";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Embed configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
    var embedConfiguration = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.All,
		filters:[Filter,Filter2],
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: true
        }
    };
  
var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration); 
 
}
&amp;lt;/script&amp;gt;

&amp;lt;div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true"   powerbi-settings-filter-pane-enabled="true"&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 02:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/200588#M6401</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-24T02:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201006#M6419</link>
      <description>&lt;P&gt;How does this implementation avoid that the user might change the username?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 06:50:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201006#M6419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-26T06:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201532#M6433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the filter logic does NOT prevent the user from changing the username and that is a serious security problem. &amp;nbsp;Based on my research there is no way to currently use RLS in the new api. &amp;nbsp;The only option currently is to create a report filter and apply it within the JS as the sample above shows.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 17:48:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201532#M6433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-26T17:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Power BI report in web application</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201884#M6441</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for response. That is a serious issue and makes the new API way less powerfull then the old embedded system. Not to say useless in a multi tenant environment.&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6971" data-lia-user-login="Eric_Zhang" class="lia-mention lia-mention-user"&gt;Eric_Zhang&lt;/a&gt;&amp;nbsp;hope the RLS feature comes soon :)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 07:08:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Power-BI-report-in-web-application/m-p/201884#M6441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-27T07:08:23Z</dc:date>
    </item>
  </channel>
</rss>

