<?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: Power BI Embedded (JavaScript) App Owns Data - RLS is not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-JavaScript-App-Owns-Data-RLS-is-not-working/m-p/1038411#M23219</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/67484"&gt;@mittalpatel130&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refer to this documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#applying-user-and-role-to-an-embed-token" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#applying-user-and-role-to-an-embed-token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "Role1"],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to replace "&lt;SPAN&gt;EffectiveIdentity&lt;/SPAN&gt;" with currently logged in &lt;STRONG&gt;user's email id&lt;/STRONG&gt;. And "Role1" should be replaced with the &lt;STRONG&gt;actual role name&lt;/STRONG&gt; which is defined in the Power BI desktop. Dataset id (&lt;SPAN&gt;fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc&lt;/SPAN&gt;) should replace with your report's dataset id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 06:45:22 GMT</pubDate>
    <dc:creator>nandukrishnavs</dc:creator>
    <dc:date>2020-04-21T06:45:22Z</dc:date>
    <item>
      <title>Power BI Embedded (JavaScript) App Owns Data - RLS is not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-JavaScript-App-Owns-Data-RLS-is-not-working/m-p/1037558#M23209</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've implemented Power BI Embedded solution (Apps own data) with Row level security using JavaScript. Embedded it successfully, however the Dynamic Row Level Security is not working in embedded page. It works fine in Power BI Service, Test as Role screen.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scenario -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Data Source - SQL Server On-premise (On-premise Gateway set-up)&lt;/P&gt;&lt;P&gt;2. Dynamic RLS is configued in Power BI Desktop&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Published Reports to Premium Capacity, upgraded Workspace&lt;/P&gt;&lt;P&gt;4. Embedded Solution - Apps Own Data using JavaScript (used &lt;STRONG&gt;GenerateToken&lt;/STRONG&gt; method)&lt;/P&gt;&lt;P&gt;5. Added &lt;STRONG&gt;EffectiveIdentity&lt;/STRONG&gt; as below in the JavaScript &lt;STRONG&gt;GenerateToken&lt;/STRONG&gt; Call.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "Role1", "Role2" ],
            "customData": "MyCustomData",
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is that I'm missing in this set up?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 20:41:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-JavaScript-App-Owns-Data-RLS-is-not-working/m-p/1037558#M23209</guid>
      <dc:creator>mittalpatel130</dc:creator>
      <dc:date>2020-04-20T20:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded (JavaScript) App Owns Data - RLS is not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-JavaScript-App-Owns-Data-RLS-is-not-working/m-p/1038411#M23219</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/67484"&gt;@mittalpatel130&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refer to this documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#applying-user-and-role-to-an-embed-token" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#applying-user-and-role-to-an-embed-token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "Role1"],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to replace "&lt;SPAN&gt;EffectiveIdentity&lt;/SPAN&gt;" with currently logged in &lt;STRONG&gt;user's email id&lt;/STRONG&gt;. And "Role1" should be replaced with the &lt;STRONG&gt;actual role name&lt;/STRONG&gt; which is defined in the Power BI desktop. Dataset id (&lt;SPAN&gt;fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc&lt;/SPAN&gt;) should replace with your report's dataset id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 06:45:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-JavaScript-App-Owns-Data-RLS-is-not-working/m-p/1038411#M23219</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-04-21T06:45:22Z</dc:date>
    </item>
  </channel>
</rss>

