<?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 BI, App owns data, dynamic RLS multiple filters in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Embed-BI-App-owns-data-dynamic-RLS-multiple-filters/m-p/2654631#M37496</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/411107"&gt;@MaartenInc&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In fact, the role part allows you to use a list of values, you do not need to duplicate defined different roles with the same usernames. I think the error should be related to these duplicate usernames.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "datasets": [{
        "id": "3a96d9f8-...-11bba1f611a2"
    }],
    "reports": [{
        "id": "d5c6f76b-...-8672d80a93ba"
    }],
    "targetWorkspaces": [{
        "id": "beca21a6-...-17f65322eb31"
    }],
    "identities": [{
            "username": "m.demo@demo.be",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "EMAIL"
            ]
        },
        {
            "username": "Demo",
            "roles": ["SystemCode", "DomainCode", "CompanyCode"],
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ]
        },
        {
            "username": "CustomSQLRoleA",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "DatabaseRole"
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&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"&gt;Using row-level security with embedded content in Power BI embedded analytics - Power BI | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2022 03:32:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-22T03:32:15Z</dc:date>
    <item>
      <title>Embed BI, App owns data, dynamic RLS multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-BI-App-owns-data-dynamic-RLS-multiple-filters/m-p/2647298#M37436</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a little stuck on implementing Dynamic RLS with multiple filters. For our scenario, I'd like to generate two reports.&lt;/P&gt;&lt;P&gt;To comprehend our security, a user is associated with a organizational unit (companycode, domaincode). A user also has one or more roles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our data model only has one table "ActiveAccidents". Which is a list of (you guessed it) active accidents. The table has fields CompanyCode, ReporterName and InvolveeName.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to create a report with dynamic RLS security, which filters the data:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;On the user's CompanyCode&lt;/LI&gt;&lt;LI&gt;Checks whether the user has the role "CustomSQLRoleA"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd also like to create a report with dynamic RLS security, which filters the data:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;On the user's CompanyCode&lt;/LI&gt;&lt;LI&gt;On the data where the user's email occurs in ReporterName or InvolveeName&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Settings this up in Power BI desktop is quit straightforward.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaartenInc_0-1658224627789.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/750573iA7334AF4B582B7E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaartenInc_0-1658224627789.png" alt="MaartenInc_0-1658224627789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaartenInc_1-1658224634633.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/750574i563EE6C01927FB28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaartenInc_1-1658224634633.png" alt="MaartenInc_1-1658224634633.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when generating the Embed Token. We always get following error message back:&lt;/P&gt;&lt;P&gt;request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "datasets": [
        {
            "id": "3a96d9f8-...-11bba1f611a2"
        }
    ],
    "reports": [
        {
            "id": "d5c6f76b-...-8672d80a93ba"
        }
    ],
    "targetWorkspaces": [
        {
            "id": "beca21a6-...-17f65322eb31"
        }
    ],
    "identities": [
        {
            "username": "m.demo@demo.be",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "EMAIL"
            ]
        },
        {
            "username": "Demo0",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "CompanyCode"
            ]
        },
        {
            "username": "Demo",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "SystemCode"
            ]
        },
        {
            "username": "Demo",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "DomainCode"
            ]
        },
        {
            "username": "CustomSQLRoleA",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "DatabaseRole"
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Status: BadRequest (400)
Response: {
    "error": {
        "code": "InvalidRequest",
        "message": "Multiple identities provided for dataset 3a96d9f8-...-11bba1f611a2"
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error message somewhat makes sense to us. But we have no idea how to approach it differently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our approach matches with what is suggested on&amp;nbsp;&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;&amp;nbsp;or&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls#dynamic-security" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls#dynamic-security&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple" target="_blank" rel="noopener"&gt;https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The limitations also don't mention that what we are trying wouldn't be supported.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:00:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-BI-App-owns-data-dynamic-RLS-multiple-filters/m-p/2647298#M37436</guid>
      <dc:creator>MaartenInc</dc:creator>
      <dc:date>2022-07-19T10:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Embed BI, App owns data, dynamic RLS multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-BI-App-owns-data-dynamic-RLS-multiple-filters/m-p/2654631#M37496</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/411107"&gt;@MaartenInc&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In fact, the role part allows you to use a list of values, you do not need to duplicate defined different roles with the same usernames. I think the error should be related to these duplicate usernames.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "datasets": [{
        "id": "3a96d9f8-...-11bba1f611a2"
    }],
    "reports": [{
        "id": "d5c6f76b-...-8672d80a93ba"
    }],
    "targetWorkspaces": [{
        "id": "beca21a6-...-17f65322eb31"
    }],
    "identities": [{
            "username": "m.demo@demo.be",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "EMAIL"
            ]
        },
        {
            "username": "Demo",
            "roles": ["SystemCode", "DomainCode", "CompanyCode"],
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ]
        },
        {
            "username": "CustomSQLRoleA",
            "datasets": [
                "3a96d9f8-...-11bba1f611a2"
            ],
            "roles": [
                "DatabaseRole"
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&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"&gt;Using row-level security with embedded content in Power BI embedded analytics - Power BI | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 03:32:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-BI-App-owns-data-dynamic-RLS-multiple-filters/m-p/2654631#M37496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-22T03:32:15Z</dc:date>
    </item>
  </channel>
</rss>

