<?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 Power Bi Embedded Dynamic Row Filtering with SQL Server and App Owns Data in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-Bi-Embedded-Dynamic-Row-Filtering-with-SQL-Server-and-App/m-p/1792838#M29070</link>
    <description>&lt;P&gt;tl;dr all of this already works so why doesn't the api endpoint support passing parameters to the role&amp;nbsp;instead of requiring manual definition unless i'm just not finding the documentation of how row level filtering on a column is supposed to be achieved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As my subject mentions, I am using the "App Owns Data" to embed reports for my customers. The data is stored in a SQL Server database.&amp;nbsp;&lt;BR /&gt;I am using RLS and want to be able to do it&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;dynamically&lt;/STRONG&gt;&lt;/EM&gt;. So that a finished report doesn't need to be updated with new role information as customers are added or removed. I just want to be able to filter a column with one or more values in the embed token itself for obvious security reasons.&lt;BR /&gt;&lt;BR /&gt;I am able to acheieve this&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;manually&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;by&amp;nbsp;creating the role as shown in my attached image. The role name is the same as the value name since they are unique to each of my customers.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="programthings_0-1618838337946.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/497279i98957ECA9D88F46C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="programthings_0-1618838337946.png" alt="programthings_0-1618838337946.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So obviously this is achievable, but the 2 dynamic solutions to this i've been able to find require paying extra for Azure Analysis Services or make my customers have to create their own accounts with microsoft which means that microsoft now receives my individual customer data which seems to fly in the face of the "App Owns Data" intention.&lt;BR /&gt;&lt;BR /&gt;The On-Premises Gateway connector clearly supports the ability to filter columns since it works via the manual way!&lt;/P&gt;&lt;P&gt;This leads me to believe I must just be unable to find the instructions of how to specify a column and array of values to filter it at the point of token creation, because everything thing needed to accomplish this is already in use!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Create a function called &lt;STRONG&gt;apiParameters() &lt;/STRONG&gt;which can be used similarly to &lt;STRONG&gt;username()&lt;/STRONG&gt; and &lt;STRONG&gt;userprincipalname()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Role Name"&amp;nbsp;[Column] = "manual string"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;would be&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Role Name"&amp;nbsp;[Column] = apiParameters() &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;request body would look like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;...
  "identities": [
    {
      "username": "john@contoso.com",
      "roles":  [
        "RoleExpectingParameters": [
          "Param1",
          "Param2"
        ],
        "ManuallyCreatedRole" 
      ],
      "datasets": [
        "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
      ]
    }
  ]
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would also ensure parameters couldn't be passed unless the report designer intended for that to be allowed by creating a role with &lt;STRONG&gt;apiParameters()&lt;/STRONG&gt; as the value&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 13:27:56 GMT</pubDate>
    <dc:creator>programthings</dc:creator>
    <dc:date>2021-04-19T13:27:56Z</dc:date>
    <item>
      <title>Power Bi Embedded Dynamic Row Filtering with SQL Server and App Owns Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-Bi-Embedded-Dynamic-Row-Filtering-with-SQL-Server-and-App/m-p/1792838#M29070</link>
      <description>&lt;P&gt;tl;dr all of this already works so why doesn't the api endpoint support passing parameters to the role&amp;nbsp;instead of requiring manual definition unless i'm just not finding the documentation of how row level filtering on a column is supposed to be achieved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As my subject mentions, I am using the "App Owns Data" to embed reports for my customers. The data is stored in a SQL Server database.&amp;nbsp;&lt;BR /&gt;I am using RLS and want to be able to do it&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;dynamically&lt;/STRONG&gt;&lt;/EM&gt;. So that a finished report doesn't need to be updated with new role information as customers are added or removed. I just want to be able to filter a column with one or more values in the embed token itself for obvious security reasons.&lt;BR /&gt;&lt;BR /&gt;I am able to acheieve this&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;manually&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;by&amp;nbsp;creating the role as shown in my attached image. The role name is the same as the value name since they are unique to each of my customers.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="programthings_0-1618838337946.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/497279i98957ECA9D88F46C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="programthings_0-1618838337946.png" alt="programthings_0-1618838337946.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So obviously this is achievable, but the 2 dynamic solutions to this i've been able to find require paying extra for Azure Analysis Services or make my customers have to create their own accounts with microsoft which means that microsoft now receives my individual customer data which seems to fly in the face of the "App Owns Data" intention.&lt;BR /&gt;&lt;BR /&gt;The On-Premises Gateway connector clearly supports the ability to filter columns since it works via the manual way!&lt;/P&gt;&lt;P&gt;This leads me to believe I must just be unable to find the instructions of how to specify a column and array of values to filter it at the point of token creation, because everything thing needed to accomplish this is already in use!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Create a function called &lt;STRONG&gt;apiParameters() &lt;/STRONG&gt;which can be used similarly to &lt;STRONG&gt;username()&lt;/STRONG&gt; and &lt;STRONG&gt;userprincipalname()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Role Name"&amp;nbsp;[Column] = "manual string"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;would be&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Role Name"&amp;nbsp;[Column] = apiParameters() &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;request body would look like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;...
  "identities": [
    {
      "username": "john@contoso.com",
      "roles":  [
        "RoleExpectingParameters": [
          "Param1",
          "Param2"
        ],
        "ManuallyCreatedRole" 
      ],
      "datasets": [
        "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
      ]
    }
  ]
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would also ensure parameters couldn't be passed unless the report designer intended for that to be allowed by creating a role with &lt;STRONG&gt;apiParameters()&lt;/STRONG&gt; as the value&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 13:27:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-Bi-Embedded-Dynamic-Row-Filtering-with-SQL-Server-and-App/m-p/1792838#M29070</guid>
      <dc:creator>programthings</dc:creator>
      <dc:date>2021-04-19T13:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Power Bi Embedded Dynamic Row Filtering with SQL Server and App Owns Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-Bi-Embedded-Dynamic-Row-Filtering-with-SQL-Server-and-App/m-p/1796851#M29103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/280252"&gt;@programthings&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;Based on my investigation, we can use DAX function&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;&lt;STRONG&gt;USERNAME()&lt;/STRONG&gt; or&lt;STRONG&gt; UserPrincipalName()&lt;/STRONG&gt;&amp;nbsp;or the CUSTOMDATA() function to implement dynamic RLS when the models with live connection mode that lie in Azure Analysis Services can use, I have not been able to find other way to achieve.&amp;nbsp; It must be a function or property that Power BI can recognize if use apiParameters to implement dynamic RLS. . .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://endjin.com/blog/2020/05/power-bi-embedded-convention-based-dynamic-row-level-security" target="_self"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;Power BI Embedded: Convention-based dynamic Row-level Security&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#working-with-analysis-services-live-connections" target="_self"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;Working with Analysis Services live connections&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 07:46:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-Bi-Embedded-Dynamic-Row-Filtering-with-SQL-Server-and-App/m-p/1796851#M29103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-21T07:46:49Z</dc:date>
    </item>
  </channel>
</rss>

