<?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: User Privileges on Data in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1894466#M29893</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I will test it and then comment if it works.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 22:13:12 GMT</pubDate>
    <dc:creator>cbarriascb</dc:creator>
    <dc:date>2021-06-10T22:13:12Z</dc:date>
    <item>
      <title>User Privileges on Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1888603#M29834</link>
      <description>&lt;P&gt;Hi Everybody!&lt;/P&gt;&lt;P&gt;I create a report that execute a database query: For Example table: "Sales". "Select user, date, usd from sales"&lt;/P&gt;&lt;P&gt;The report is a table that show all field of the query.&lt;/P&gt;&lt;P&gt;I have other table with the users and power bi account users: "Select user, pbiuser from users".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need when the user &lt;A href="mailto:A@onmicrosoft.com" target="_blank"&gt;A@onmicrosoft.com&lt;/A&gt; entry to the report, he only has access to his data. He can't see the other users data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to filter the data to show in the report, according to the logged in user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;Hola a todos!&lt;/P&gt;&lt;P&gt;Les cuento mi caso:&lt;/P&gt;&lt;P&gt;Genere un reporte que consulta una base de dato: Por ejemplo tabla "Sales". "Select user, date, usd from sales"&lt;/P&gt;&lt;P&gt;El reporte es una tabla que muestra todos los campos de la consulta.&lt;/P&gt;&lt;P&gt;Tengo otra tabla (Users) con los usuarios y su cuenta de power bi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quiero que cuando ingrese el usuario A@onmicrosoft.com, vea el reporte solo con los datos del usuario A.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;¿Es posible realizar ese filtro?&lt;/P&gt;&lt;P&gt;¿Se puede realizar un filtro sobre los datos de acuerdo al usuario logueado que ejecuta el reporte?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desde ya muchas gracias.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 15:57:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1888603#M29834</guid>
      <dc:creator>cbarriascb</dc:creator>
      <dc:date>2021-06-08T15:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: User Privileges on Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1892728#M29873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="306268" data-lia-user-login="cbarriascb" class="lia-mention lia-mention-user"&gt;cbarriascb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your statement, I think you want to restrict users to see the data by their account. You may want users can only see the data which they have access to.&lt;/P&gt;
&lt;P&gt;Please try Dynamical RLS in Power BI to achieve your goal.&amp;nbsp;&lt;SPAN&gt;Row-level security (RLS) with Power BI can be used to restrict data access for given users. Filters restrict data access at the row level, and you can define filters within roles.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I build a sample to have a test.&lt;/P&gt;
&lt;P&gt;Data Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;User Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;We need to build a relationship between ID columns(Key column) in two tables.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then we find Manage Roles in Modeling ,build a new role and create Dax code.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Dax Code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[ID] = 
CALCULATE (
    MAX(Data[ID]),
    FILTER (
        User,
        User[email] = USERPRINCIPALNAME()
            &amp;amp;&amp;amp; User[ID] = Data[ID]
    )
) &lt;/LI-CODE&gt;
&lt;P&gt;Let's have a test by View as function.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;It works well. Then we can publish this report to Service. And we need to add users in Role in Dataset Security.&lt;/P&gt;
&lt;P&gt;For more details: &lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls#manage-security-on-your-model" target="_self"&gt;Manage security on your model&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Users should only have view permission to dataset. If they have edit permission, RLS couldn't restrict them any more.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference: &lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls" target="_self"&gt;Row-level security (RLS) with Power BI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls" target="_self"&gt;Dynamic Row Level Security with Power BI Made Simple&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 07:53:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1892728#M29873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T07:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: User Privileges on Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1894466#M29893</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I will test it and then comment if it works.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 22:13:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1894466#M29893</guid>
      <dc:creator>cbarriascb</dc:creator>
      <dc:date>2021-06-10T22:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: User Privileges on Data</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1896328#M29927</link>
      <description>&lt;P&gt;Thank you! it's works properly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 15:39:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/User-Privileges-on-Data/m-p/1896328#M29927</guid>
      <dc:creator>cbarriascb</dc:creator>
      <dc:date>2021-06-11T15:39:14Z</dc:date>
    </item>
  </channel>
</rss>

