<?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: How do set the Row-level Security roles within the PowerBiClient SDK in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4661156#M60608</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1249726"&gt;@BartHuls&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please do raise your new thoughts in the ideas forum and upvote it so that it will be adressed by the Microsoft internal team.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ C Srikanth.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Apr 2025 12:45:14 GMT</pubDate>
    <dc:creator>v-csrikanth</dc:creator>
    <dc:date>2025-04-21T12:45:14Z</dc:date>
    <item>
      <title>How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4643378#M60270</link>
      <description>&lt;P&gt;All,&lt;BR /&gt;WithIn the PowerBiClient SDK I want to update / set&amp;nbsp;&amp;nbsp;a Row-level Security roles.&lt;BR /&gt;The Group will then be visible in underlying screen.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&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="BartHuls_0-1744122595113.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1258272i9060C0F00691E73A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BartHuls_0-1744122595113.png" alt="BartHuls_0-1744122595113.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 14:34:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4643378#M60270</guid>
      <dc:creator>BartHuls</dc:creator>
      <dc:date>2025-04-08T14:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4643989#M60281</link>
      <description>&lt;P&gt;Not currently available in any of the APIs.&amp;nbsp;If this is important to you please consider voting for an existing idea or raising a new one at &lt;A href="https://ideas.fabric.microsoft.com" target="_blank"&gt;https://ideas.fabric.microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 23:51:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4643989#M60281</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-08T23:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4644560#M60288</link>
      <description>&lt;P&gt;Is there a way to set this from the outside? how to a access a xmla endpoint&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 08:10:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4644560#M60288</guid>
      <dc:creator>BartHuls</dc:creator>
      <dc:date>2025-04-09T08:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4644903#M60299</link>
      <description>&lt;P&gt;If this is important to you please consider voting for an existing idea or raising a new one at &lt;A href="https://ideas.fabric.microsoft.com" target="_blank"&gt;https://ideas.fabric.microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 11:31:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4644903#M60299</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-09T11:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4661156#M60608</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1249726"&gt;@BartHuls&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please do raise your new thoughts in the ideas forum and upvote it so that it will be adressed by the Microsoft internal team.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ C Srikanth.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 12:45:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4661156#M60608</guid>
      <dc:creator>v-csrikanth</dc:creator>
      <dc:date>2025-04-21T12:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do set the Row-level Security roles within the PowerBiClient SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4662734#M60649</link>
      <description>&lt;P&gt;This cannot be done by the&amp;nbsp;PowerBIClient SDK.&lt;BR /&gt;&lt;BR /&gt;For now I have the following solution. It's not nice, but it works. based on the&amp;nbsp;Microsoft.AnalysisServices.Tabular lib.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;public async Task SetRowLevelSecurity(string groupName, string datasetId, Guid domainGroupId, string domainName, string tenantId)
    {
        _authenticationResult ??= await GetAccessToken();

        var dataSource = $"powerbi://api.powerbi.com/v1.0/{domainName}/{groupName}";

        using var server = new Server();
        server.Connect($"DataSource={dataSource};Password={_authenticationResult.AccessToken}");

        var database = server.Databases.Find(datasetId) ?? throw new NullReferenceException(_cannotFindDataSet);

        // Cast is needed otherwise the loading does not work
        var model = (Model)database.Model;
        var role = model.Roles.Find(&amp;lt;RoleName&amp;gt;);
        if (role is not null)
        {
            var memberName = $"obj:{domainGroupId}@{tenantId}";
            var member = role.Members.FirstOrDefault(m =&amp;gt; m.Name.Contains(memberName, StringComparison.OrdinalIgnoreCase));
            if (member is not null)
            {
                return;
            }

            role.Members.Add(new ExternalModelRoleMember
            {
                MemberName = memberName,
                MemberType = RoleMemberType.Group,
                IdentityProvider = "AzureAD"
            });
            database.Model.SaveChanges();

            logger.LogInformation("Row Level Security set for {GroupId} for dataset {DataSetId}", domainGroupId, datasetId);
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 09:42:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-do-set-the-Row-level-Security-roles-within-the-PowerBiClient/m-p/4662734#M60649</guid>
      <dc:creator>BartHuls</dc:creator>
      <dc:date>2025-04-22T09:42:03Z</dc:date>
    </item>
  </channel>
</rss>

