<?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 Pass UID from App to Embeded report in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Pass-UID-from-App-to-Embeded-report/m-p/198760#M6335</link>
    <description>&lt;P&gt;Is it possible, with embedded report, to filter content automatically based on the UID logged ito the app which the report is embedded?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 19:29:02 GMT</pubDate>
    <dc:creator>twalsh0625</dc:creator>
    <dc:date>2017-06-21T19:29:02Z</dc:date>
    <item>
      <title>Pass UID from App to Embeded report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Pass-UID-from-App-to-Embeded-report/m-p/198760#M6335</link>
      <description>&lt;P&gt;Is it possible, with embedded report, to filter content automatically based on the UID logged ito the app which the report is embedded?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 19:29:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Pass-UID-from-App-to-Embeded-report/m-p/198760#M6335</guid>
      <dc:creator>twalsh0625</dc:creator>
      <dc:date>2017-06-21T19:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Pass UID from App to Embeded report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Pass-UID-from-App-to-Embeded-report/m-p/200586#M6400</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/20994"&gt;@twalsh0625&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Is it possible, with embedded report, to filter content automatically based on the &lt;STRONG&gt;UID&lt;/STRONG&gt; logged ito the app which the report is embedded?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/20994"&gt;@twalsh0625&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;P&gt;If the UID you mean is a Power BI Account, you can use &lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding/#embedding-with-power-bi-users" target="_self"&gt;Embedding with Power BI users&lt;/A&gt;&amp;nbsp;and set &lt;A href="https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/" target="_self"&gt;Power BI Row Level Security&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the UID you mean is the userID in your own app,&amp;nbsp;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"&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"&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"&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 () { 
 

var uid= ["uid1"]; //get the uid with javascript from your page

 var  Filter = {
   $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Table",
    column: "UID"
  },  
      operator: "Contains",
      values: uid
     
	 
} 
    // 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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 02:00:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Pass-UID-from-App-to-Embeded-report/m-p/200586#M6400</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-24T02:00:25Z</dc:date>
    </item>
  </channel>
</rss>

