<?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: How to do Dynamic RLS in PowerBI without manually entering roles? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1388587#M25828</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31"&gt;@TomMartens&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 00:14:49 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-09-23T00:14:49Z</dc:date>
    <item>
      <title>How to do Dynamic RLS in PowerBI without manually entering roles?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1388430#M25822</link>
      <description>&lt;P&gt;My company is trying to do Dynamic RLS for PowerBI Embedded on behalf of our customers, but I am running into some major roadblocks while trying to secure the data.&amp;nbsp; The requirements/steps of what we are doing are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create reports on behalf of our customers, who in turn give access to the reports to &lt;EM&gt;their&lt;/EM&gt; customers.&lt;/LI&gt;&lt;LI&gt;Our customers create users/logins via our product (which they share with their customers), and assign key-value pairs to said users to act as security.&amp;nbsp; Example: &lt;FONT face="andale mono,times"&gt;{"groupId": 123, "region": ["US-West", "US-Southwest"]}&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;When the end-user logs into our application, they should see the embedded report filtered appropriately: &lt;FONT face="andale mono,times"&gt;group_id = 123 AND region IN ('US-West', 'US-Southwest')&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Since the data is dynamically generated, and since these key-value-pairs aren't known ahead of time (neither the number of them, the keys, the values, or the data types), we cannot hardcode or hand-enter in roles anywhere (unless there is a static role or two that can be re-used), nor can we re-publish frequently as roles are modified.&lt;/LI&gt;&lt;LI&gt;We are taking the "App Owns Data" approach to embedding PowerBI in our application.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;All approaches to RLS I have seen thus far require manual entry of roles/members either into a PowerBI Desktop, PowerBI web, and/or a static table in PowerBI Desktop.&amp;nbsp; Are there any approaches that will work?&amp;nbsp; The only option I have seen so far is attempting to embed the key-value-pairs into the embed token's &lt;FONT face="andale mono,times"&gt;username&lt;/FONT&gt; field (which is limited to 256 ASCII chars only) and somehow parse it using a DAX expression.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 21:28:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1388430#M25822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-22T21:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Dynamic RLS in PowerBI without manually entering roles?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1388587#M25828</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31"&gt;@TomMartens&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 00:14:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1388587#M25828</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-09-23T00:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Dynamic RLS in PowerBI without manually entering roles?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1390855#M25849</link>
      <description>&lt;P&gt;Hey&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I consider this requirement not possible, due to this simple fact: RLS is based on roles with rules assigned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theses rules are an essential part of the data model and can not be changed during querying.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thinks the only viable approach is to create something called "JSON script filters", here you will find some more description:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#using-rls-vs-javascript-filters" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#using-rls-vs-javascript-filters&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course this is something that I would call: security by obscurity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this architecture is a more complex architecture, meaning there are three parties involved I would consider this approach:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Your customers has to provide you with information about email and the key/value pair&lt;/LI&gt;
&lt;LI&gt;something (maybe an Azure function is executed triggerd by an Azure Logic App, the function executes a TMSL script and&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;voila a new role is created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to admit, that I'm currently not sure if the data model has to be re-processed if a new role is added, my assumption: No!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 16:39:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-do-Dynamic-RLS-in-PowerBI-without-manually-entering-roles/m-p/1390855#M25849</guid>
      <dc:creator>TomMartens</dc:creator>
      <dc:date>2020-09-23T16:39:44Z</dc:date>
    </item>
  </channel>
</rss>

