<?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 AD group name gets changed when adding Row Level Security in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/AD-group-name-gets-changed-when-adding-Row-Level-Security/m-p/3586086#M32086</link>
    <description>&lt;P&gt;I have created a dashbaord that is meant to only show the data for the current logged in user. I followed the directions at&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/report-server/row-level-security-report-server?source=recommendations" target="_blank"&gt;Row-level security (RLS) in Power BI Report Server - Power BI | Microsoft Learn&lt;/A&gt;&amp;nbsp;to set up Row Level Security to accomplish it and it works when I explicitly add a users username as a member on the Report Server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am running into is when I try to add one of our AD groups as a member, the name of the group gets an extra space added to it after it is added. I have tried multiple times typing it correctly and have double checked that it is the correct name in AD, but every time I save it the extra space is added. If I try to add the correctly typed group name while the group with an extra space is in the list, it errors out and says that something went wrong. Since the name has the extra space in it, it doesn't show a user their data on the dashboard if they are in the group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I'll type in the AD group (not the actual group but same structure): "IT-GROUP-Name" and when it saves it is changed to "IT-GROUP- Name". There is an extra space added after the second dash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 16:00:37 GMT</pubDate>
    <dc:creator>SilentM</dc:creator>
    <dc:date>2023-12-15T16:00:37Z</dc:date>
    <item>
      <title>AD group name gets changed when adding Row Level Security</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/AD-group-name-gets-changed-when-adding-Row-Level-Security/m-p/3586086#M32086</link>
      <description>&lt;P&gt;I have created a dashbaord that is meant to only show the data for the current logged in user. I followed the directions at&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/report-server/row-level-security-report-server?source=recommendations" target="_blank"&gt;Row-level security (RLS) in Power BI Report Server - Power BI | Microsoft Learn&lt;/A&gt;&amp;nbsp;to set up Row Level Security to accomplish it and it works when I explicitly add a users username as a member on the Report Server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am running into is when I try to add one of our AD groups as a member, the name of the group gets an extra space added to it after it is added. I have tried multiple times typing it correctly and have double checked that it is the correct name in AD, but every time I save it the extra space is added. If I try to add the correctly typed group name while the group with an extra space is in the list, it errors out and says that something went wrong. Since the name has the extra space in it, it doesn't show a user their data on the dashboard if they are in the group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I'll type in the AD group (not the actual group but same structure): "IT-GROUP-Name" and when it saves it is changed to "IT-GROUP- Name". There is an extra space added after the second dash.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 16:00:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/AD-group-name-gets-changed-when-adding-Row-Level-Security/m-p/3586086#M32086</guid>
      <dc:creator>SilentM</dc:creator>
      <dc:date>2023-12-15T16:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: AD group name gets changed when adding Row Level Security</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/AD-group-name-gets-changed-when-adding-Row-Level-Security/m-p/3901113#M34823</link>
      <description>&lt;P&gt;That is strange!!&amp;nbsp;&lt;BR /&gt;Try to use script to add the AD group to RLS. here is powershell script you can use to update it.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;$ReportServerUri = "https://&amp;lt;server_name&amp;gt;/PBIReports&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;#API to get roles and role assignments&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;$RoleAssignmentsPath = $ReportServerUri + "/api/v2.0/PowerBIReports(Path='&amp;lt;ReportPath&amp;gt;')/DataModelRoleAssignments"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;$RolesPath = $ReportServerUri + "/api/v2.0/PowerBIReports(Path='&amp;lt;ReportPath&amp;gt;')/DataModelRoles"&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;#call API - row level security &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;$RoleAssignments = Invoke-RestMethod -Uri $RoleAssignmentsPath -ContentType "application/json" -UseDefaultCredentials -Method Get&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;#call API - RLS role&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;$Roles = Invoke-RestMethod -Uri $RolesPath -ContentType "application/json" -UseDefaultCredentials -Method Get&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;#Get roleId&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#808080"&gt;$RoleId = $Roles.value[0].ModelRoleId&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;$NewRoleAssignments = @( [pscustomobject]@{GroupUserName='&amp;lt;ADGroupName&amp;gt;';DataModelRoles=@($RoleId)} )&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;$RoleAssignmentsResult = $RoleAssignments.value + $NewRoleAssignments&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;$RoleAssignmentsjson = $RoleAssignmentsResult | ConvertTo-Json&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;Invoke-RestMethod -Uri $RoleAssignmentsPath&amp;nbsp; -ContentType "application/json" -Body $RoleAssignmentsjson -UseDefaultCredentials -Method Put&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;note that in above script if your report is in root folder of PBIRS portal then&amp;nbsp;&amp;nbsp;&lt;FONT color="#808080"&gt;&amp;lt;ReportPath&amp;gt;&amp;nbsp;&lt;/FONT&gt;&amp;nbsp;is /report_name&lt;/DIV&gt;&lt;DIV&gt;hope this fix your issue!&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 06:11:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/AD-group-name-gets-changed-when-adding-Row-Level-Security/m-p/3901113#M34823</guid>
      <dc:creator>sarada</dc:creator>
      <dc:date>2024-05-08T06:11:39Z</dc:date>
    </item>
  </channel>
</rss>

