<?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: Row Level Security in Power BI Report Server in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/527872#M8143</link>
    <description>&lt;P&gt;I'm trying to do something similar with the SQL server security table but ran into problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my table of users and can filter the SQL queries fine using the current user. However, when I run a scheduled refresh of the data in Report server it uses the specified credentials and so returns no data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried creating a measure using&amp;nbsp;CurrentUser = USERNAME() and then filtering the model by this but it won't let me use this measure in a table filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to refresh the data with the admin credentials and return all rows, then filter by the current user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2018 14:32:53 GMT</pubDate>
    <dc:creator>andy_scott42</dc:creator>
    <dc:date>2018-09-27T14:32:53Z</dc:date>
    <item>
      <title>Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/311546#M2550</link>
      <description>&lt;P&gt;Hi, I am trying to implement 'Row Level Security' in Power BI On premise-solution&lt;/P&gt;&lt;P&gt;1. Creating roles in 'Microsoft Power BI Desktop for Report Server - October 2017' works fine in desktop but then there is no option to add users to these specific 'Row Level Security groups' in Power BI report server. In Power BI online, there is option to add users/ groups once reports are published from desktop to cloud. I cannot see similar option in report server&lt;/P&gt;&lt;P&gt;2. I tried to create a SQL table and tried to implement row level security dynamically by reading data. The table is in below format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UserId&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SecurityGroup&lt;/P&gt;&lt;P&gt;domain/test1&amp;nbsp; &amp;nbsp; USA&lt;/P&gt;&lt;P&gt;domain/test2&amp;nbsp; &amp;nbsp; Europe&lt;/P&gt;&lt;P&gt;domain/test3&amp;nbsp; &amp;nbsp; Asia&lt;/P&gt;&lt;P&gt;Then I created a Role which filters based on username() in 'Microsoft Power BI Desktop for Report Server - October 2017' Again, this is working fine in 'Microsoft Power BI Desktop for Report Server - October 2017' but when I "SAVE AS" the report to "Power BI Report Server" then the security is not working All users are able to see data for all countries. I am providing 'Browser' role to the users in report server. Any idea what I am doing wrong in the set-up? Or how can I implement row level security in reports saved to Report Server?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 12:08:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/311546#M2550</guid>
      <dc:creator>nitin_goel05</dc:creator>
      <dc:date>2017-11-27T12:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/313525#M2597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="46866" data-lia-user-login="nitin_goel05" class="lia-mention lia-mention-user"&gt;nitin_goel05&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a look at my reply in this similar &lt;A href="http://community.powerbi.com/t5/Report-Server/Row-Level-Security-with-Direct-Query-not-SSAS/m-p/311744#M2558" target="_self"&gt;thread&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yuliana Gu&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 08:28:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/313525#M2597</guid>
      <dc:creator>v-yulgu-msft</dc:creator>
      <dc:date>2017-11-29T08:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/353195#M3790</link>
      <description>&lt;P&gt;As far as I know still, it was not implimented, but we can use another way to create a measure as given below&lt;/P&gt;&lt;P&gt;filterRLS&amp;nbsp;=&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(Data),&lt;BR /&gt;Data[UserName] = USERNAME())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;above DAX,&amp;nbsp; Data is the table name and Data[UserName] is the filed. User name format is "&amp;lt;domain\username&amp;gt;". after creating the measure you can filter using report level as FilterRLS =1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will filter according the current user.. enjoy..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 06:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/353195#M3790</guid>
      <dc:creator>praseejbk</dc:creator>
      <dc:date>2018-02-07T06:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/354164#M3804</link>
      <description>&lt;P&gt;Please vote on the idea here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/31122463-dynamic-row-level-security-for-power-bi-report-ser&amp;nbsp;" target="_blank"&gt;https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/31122463-dynamic-row-level-security-for-power-bi-report-ser&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 02:10:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/354164#M3804</guid>
      <dc:creator>AdamF</dc:creator>
      <dc:date>2018-02-08T02:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/382128#M4631</link>
      <description>&lt;P&gt;I setup the measure like you mentioned, but am having troubles applying it as a report level filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to set report level filters with table columns, but measures seem to not be allowed.&amp;nbsp; I drag the measure over to the report level filter section but it will not take the measure.&amp;nbsp;&amp;nbsp;Would you please explain a little more on how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance :) - This has been a real PITA, and I wish Microsoft would just add RLS to Report Server (On-Prem).&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 22:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/382128#M4631</guid>
      <dc:creator>alecthomas</dc:creator>
      <dc:date>2018-03-22T22:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/383879#M4672</link>
      <description>&lt;P&gt;We have succesfully implemented Row Level Security, however we have had to create a SSAS Tabular Model to do it. Hopefully there are plans in the future to make Row Level Security easier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The article below uses a good example as to how it can be done (same way as we implemented it):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="" href="https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 14:58:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/383879#M4672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/388252#M4829</link>
      <description>&lt;P&gt;Thanks for the info jdenne.&amp;nbsp; It's too bad they haven't added Row Level Security into Power BI Report Server yet.&amp;nbsp; I guess we will go down this route and see if it will work for what we are trying to do without creating too much additional work.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:02:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/388252#M4829</guid>
      <dc:creator>alecthomas</dc:creator>
      <dc:date>2018-04-09T15:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/400525#M5227</link>
      <description>&lt;P&gt;We're using a different method that implements RLS at the database level for Power BI reports.&amp;nbsp; This is in SQL Server 2016.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can't pass the logged-in user ID to SQL Server.&amp;nbsp; However, if you use 'Windows Authentication' / 'As the user viewing the report' on the Data Source Settings for the report, you can use the SYSTEM_USER function to get the user ID within SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We created a permissions table and a number of security predicates in our DB, using SYSTEM_USER to determine the logged in user.&amp;nbsp; I like this method better than building filters in the report itself because you only have to build the security predicates once; every report you build using those secured tables automatically gets RLS, instead of having to incorporate it in every report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think security predicates are only available in SQL Server 2016 and later.&amp;nbsp; In earlier versions you could set up stored procedures or views as the data source for your reports and build the RLS login in those directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A potential drawback with this approach is every report user needs a SQL login.&amp;nbsp; We got around that by creating an Active Directory group, giving the group the SQL login, and putting all the report users in the group.&amp;nbsp; That worked well for us because we were already using the AD group for other purposes and we had processes/procedures set up to maintain the group membership.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 22:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/400525#M5227</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-04-19T22:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402200#M5285</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="61816" data-lia-user-login="davidm5" class="lia-mention lia-mention-user"&gt;davidm5&lt;/a&gt;&amp;nbsp;after moving RLS implementation to DB level, do you still require Power BI Pro license to use this RLS (db) feature?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 11:21:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402200#M5285</guid>
      <dc:creator>vedran</dc:creator>
      <dc:date>2018-04-23T11:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402364#M5294</link>
      <description>&lt;P&gt;No, in this scenario the report consumers don't require a Power BI license.&amp;nbsp; The report developer still requires a Pro license to publish the report to the server.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 14:45:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402364#M5294</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-04-23T14:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402368#M5295</link>
      <description>&lt;P&gt;Great! Thanks a lot for the quick answer&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 14:49:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/402368#M5295</guid>
      <dc:creator>vedran</dc:creator>
      <dc:date>2018-04-23T14:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/503873#M7587</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="61816" data-lia-user-login="davidm5" class="lia-mention lia-mention-user"&gt;davidm5&lt;/a&gt;&amp;nbsp;Can you explain step by step process. How can we use SYSTEM_USER in SQL Server?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:19:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/503873#M7587</guid>
      <dc:creator>Chai</dc:creator>
      <dc:date>2018-08-30T21:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/503912#M7590</link>
      <description>&lt;P&gt;All right, here's my best attempt to walk through it.&amp;nbsp;&amp;nbsp;For this example I’ll be using the AdventureWorksDW2012 database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my hypothetical case, I’ve got regional sales directors that should only be able to see information for employees that are in their assigned sales territories.&amp;nbsp; I’m going to implement that by putting a security policy on the DimEmployee table.&amp;nbsp; In summary the steps are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create and populate a new table that defines which sales territories a particular user (as defined by their Windows login ID) is allowed to access.&lt;/LI&gt;&lt;LI&gt;Create a new function in SQL Server that checks the relationship between user and allowed sales territories.&lt;/LI&gt;&lt;LI&gt;Create a new security policy on the DimEmployee table using the function created in step 2.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Once those steps are done I can create a report in Power BI that accesses the DimEmployee table and take advantage of the implemented RLS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In more detail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Create a new table that defines which sales territories a user may access.&lt;/STRONG&gt;&amp;nbsp; I called my table SalesTerritoryRLS.&amp;nbsp; It’s a simple table with two columns that looks like this:&lt;/LI&gt;&lt;/OL&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;NetID&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SalesTerritoryKey&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Davidm5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Davidm5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;SomeOtherUser&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The NetID column is simply the Windows user ID of the user, and SalesTerritoryKey correlates to the column SalesTerritoryKey in the DimEmployee table.&amp;nbsp; So as currently populated this table says that I (davidm5) am allowed to see data for sales territories 1 and 4; the user ‘SomeOtherUser’ is allowed to see data for sales territory 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Create a new function in SQL Server.&lt;/STRONG&gt; The SQL to create the function looks like this:&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;SET ANSI_NULLS ON&lt;/P&gt;&lt;P&gt;GO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET QUOTED_IDENTIFIER ON&lt;/P&gt;&lt;P&gt;GO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CREATE FUNCTION [dbo].[fn_SalesTerritory_SecurityPredicate] (@salesTerritory AS int)&lt;/P&gt;&lt;P&gt;RETURNS TABLE&lt;/P&gt;&lt;P&gt;WITH SCHEMABINDING&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT 1 AS fn_SecurityPredicateResult&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM dbo.SalesTerritoryRLS rls&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE rls.SalesTerritoryKey = @salesTerritory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND rls.NetID = SYSTEM_USER&lt;/P&gt;&lt;P&gt;GO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We’ll apply this function as a filter in the next step.&amp;nbsp; Basically this function checks to see if the sales territory on a row it’s evaluating is one of the sales territories the currently logged in user is allowed to access.&amp;nbsp; That’s where SYSTEM_USER comes in – see the final line of the WHERE clause.&amp;nbsp; SYSTEM_USER is the ID of the currently logged in user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Create a security policy using the function.&lt;/STRONG&gt; The SQL for this is:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;CREATE SECURITY POLICY [dbo].[dimEmployeeFilter]&lt;/P&gt;&lt;P&gt;ADD FILTER PREDICATE [dbo].[fn_SalesTerritory_SecurityPredicate]([SalesTerritoryKey]) ON [dbo].[DimEmployee]&lt;/P&gt;&lt;P&gt;WITH (STATE = ON, SCHEMABINDING = ON)&lt;/P&gt;&lt;P&gt;GO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This ties the function created above to the DimEmployee table. &amp;nbsp;When you do any SQL operation on the table, it passes in the SalesTerritoryKey for each row and the function is used to determine if it’s a row the user is allowed to access, based on the values in the RLS table created in step 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you’re free to access DimEmployee in your Power BI report and RLS will be enforced.&amp;nbsp; Note that for this to work you MUST use ‘Windows Authentication’/’As the user viewing the report’ on the Data Source Settings for the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice that creating the function and applying it as a security policy are two different steps.&amp;nbsp; That means you could apply that same function to multiple tables to implement our RLS on sales territory across multiple tables if you’d like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also be aware that this means RLS is applied at the data layer; for any tool the user might use to access the DimEmployee table, RLS will be applied.&amp;nbsp; Even if I log into SSMS directly to query the DimEmployee table, I’ll only be able to see rows where the sales territory is 1 or 4.&amp;nbsp; And the way I wrote this particular function means that by default users get NO access to DimEmployee data; until a row is entered for them in the SalesTerritoryRLS table, they won’t be able to see any DimEmployee data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 23:47:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/503912#M7590</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-08-30T23:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/512451#M7808</link>
      <description>&lt;P&gt;davidm5, this is the method we've got running on our database layer, RLS is enabled for the currently connected user. The only issue we're having is passing the logged in user's credentials to the database via the report in the Report Server (on-prem). Do you have a similar set up or any insight this double-hop authentication?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 05:52:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/512451#M7808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-11T05:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/513156#M7834</link>
      <description>&lt;P&gt;I'm about out of my depth here, but I'll try to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you set up the report on Report Server, when you go to Manage &amp;gt; Data Sources and look at the Credentials section, you MUST use 'Windows Authentication' as the Authentication Type, and you MUST use the 'As the user viewing the report' option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in SQL Server, for whatever database you're using that same user ID must have permissions on the database.&amp;nbsp; I think just db_datareader is all you need but I'm not certain about that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only trick we do is to use an active directory group.&amp;nbsp; This is where I'm sketchy, but if I understand it correctly we actually give the AD group the SQL permissions, then just add the Windows user ID to that AD group.&amp;nbsp; It isn't necessary to do it this way, it just makes our user management a little easier.&amp;nbsp; We already have mechanisms in place to handle adding and removing users from the AD group as employment and roles change - by using the AD group we don't have to seperately manage SQL permissions per user ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps.&amp;nbsp; If not, if you can provide details I can try and provide more info.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 21:34:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/513156#M7834</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-09-11T21:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/513173#M7836</link>
      <description>&lt;P&gt;Hmm. Thanks Davidm5, but we've already got that setup. We have a group saved into the DB Server and have datareader permissions set for the required DB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; following link in a previous thread describes our setup: &lt;A href="https://community.powerbi.com/t5/Report-Server/DirectQuery-Login-failed-for-user-NT-AUTHORITY-ANONYMOUS-LOGON/m-p/512411/highlight/true#M7807" target="_blank"&gt;DirectQuery-Login-failed-for-user-NT-AUTHORITY-ANONYMOUS-LOGON&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll clarify the problem by saying that the DirectQuery and RLS stuff works - but only when viewing the report&amp;nbsp;via Chrome. Using IE throws either a Kerberos constrained delegation error, or 'connection string not properly formed' error. So even though we're looking at the same report, different browsers behave differently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Internet options have been set on IE and the site has been added as 'Intranet' level security.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:smileyfrustrated:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 22:39:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/513173#M7836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-11T22:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/515147#M7872</link>
      <description>&lt;P&gt;I'm sorry I don't have an answer for you, but I can tell you that it's working in IE for us so I can confirm it's possible.&amp;nbsp; I don't know what magic the networking folks might have done behind the scene to pull that off though.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 14:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/515147#M7872</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-09-13T14:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/516919#M7924</link>
      <description>&lt;P&gt;No problems davidm5, we managed to figure it out, thanks for your contribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For those of you still struggling with Kerberos authentication between an SQL Server (2016) and On-Prem report server, here is a few things to check when following the Kerberos configuration article posted on the MSDN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure your user has access to the datasource with datareader permissions, either via a dedicated logon or as part of a group logon.&lt;/LI&gt;&lt;LI&gt;Ensure that you set up constrained delegation for the&amp;nbsp; (domain) user accounts that run SQL Server and Report Server&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Ensure that you have enabled constrained delegation on the server accounts themselves (i.e. the Computer's AD Entry must allow for Kerberos Authentication)&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That last, bolded part is what had caused us headache.&amp;nbsp;From our perspective, it seems that the MSDN article missed a few steps..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 01:45:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/516919#M7924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-17T01:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/527872#M8143</link>
      <description>&lt;P&gt;I'm trying to do something similar with the SQL server security table but ran into problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my table of users and can filter the SQL queries fine using the current user. However, when I run a scheduled refresh of the data in Report server it uses the specified credentials and so returns no data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried creating a measure using&amp;nbsp;CurrentUser = USERNAME() and then filtering the model by this but it won't let me use this measure in a table filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to refresh the data with the admin credentials and return all rows, then filter by the current user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:32:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/527872#M8143</guid>
      <dc:creator>andy_scott42</dc:creator>
      <dc:date>2018-09-27T14:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security in Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/527942#M8144</link>
      <description>&lt;P&gt;If I understand what you're trying to do,&amp;nbsp;you're NOT using a security policy in SQL Server for RLS.&amp;nbsp; I say that because that technique doesn't work if you're doing scheduled refreshes, it only works for direct query.&amp;nbsp; If I've misunderstood, my apologies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with the assumption I understand what you're trying to do, here's an approach:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- You'll need a table in your report that links user ID's to whatever the filter field is.&amp;nbsp; Let's call it SalesTerritoryRLS.&amp;nbsp; It only needs to have two columns, one with the user ID and the second with the filter value. &amp;nbsp;It's the table I gave in step 1 of my example earlier in this thread.&lt;/P&gt;&lt;P&gt;- Create a measure that looks like this:&amp;nbsp; filterRLS = CALCULATE(COUNTROWS(SalesTerritoryRLS), SalesTerritoryRLS[NetID] = USERNAME())&lt;/P&gt;&lt;P&gt;- Now add a visual level filter to the visual that's displaying the data you want to filter&amp;nbsp;where filterRLS is 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done this as proof of concept, but not tried it in anything that's been deployed to a large set of users, so it's possible there are problems with this approach I've not run across.&amp;nbsp; In my proof of concept it worked fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 15:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Row-Level-Security-in-Power-BI-Report-Server/m-p/527942#M8144</guid>
      <dc:creator>davidm5</dc:creator>
      <dc:date>2018-09-27T15:23:49Z</dc:date>
    </item>
  </channel>
</rss>

