<?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: Problem with PBI embedded + app only auth + RLS in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1335801#M25502</link>
    <description>&lt;P&gt;I looks like that might be the case.. Do you have any advice for an approach in my case where we'd like to offer embedded reports to our customers - we're looking at starting with one report with a dataset containing all customers' data. What is the "correct" approach for this case? One report, but with a unique dataset for each customer?&lt;/P&gt;</description>
    <pubDate>Mon, 31 Aug 2020 10:18:43 GMT</pubDate>
    <dc:creator>MichaelBluth</dc:creator>
    <dc:date>2020-08-31T10:18:43Z</dc:date>
    <item>
      <title>Problem with PBI embedded + app only auth + RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1329970#M25479</link>
      <description>&lt;P&gt;I have a report where I've created a role "customer" with DAX expression "[ColumnName] = USERNAME()". I'm trying to get an embed token for this report through the C# API using app only auth:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string applicationId = "***", applicationPassword = "***",
  datasetId = "***", groupId = "***", reportId = "***";

var context = new AuthenticationContext("https://login.microsoftonline.com/tenantId/");
var clientCredential = new ClientCredential(applicationId, applicationPassword);
var result = context.AcquireTokenAsync("https://analysis.windows.net/powerbi/api", 
  clientCredential).Result;
var authHeader = new TokenCredentials(result.AccessToken, "Bearer");
var client = new PowerBIClient(new Uri("https://api.powerbi.com"), authHeader);
var tokenRequest = new GenerateTokenRequest(TokenAccessLevel.View,
  datasetId, new EffectiveIdentity("42", new List&amp;lt;string&amp;gt; { datasetId },
  new List&amp;lt;string&amp;gt; { "customer" }));
var embedToken = client.Reports.GenerateTokenInGroupAsync(new Guid(groupId),
  new Guid(reportId), tokenRequest, cancellationToken: CancellationToken.None).Result;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call the GenerateTokenInGroupAsync method, I get a Bad Request error with the following message: "InvalidRequest: Creating embed token for accessing dataset &amp;lt;datasetId&amp;gt; shouldn't have effective identity". What am I doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 19:11:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1329970#M25479</guid>
      <dc:creator>MichaelBluth</dc:creator>
      <dc:date>2020-08-27T19:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PBI embedded + app only auth + RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1330214#M25482</link>
      <description>&lt;P&gt;My takeaway from the presentation today is that RLS is not supported in the "App owns data"&amp;nbsp; model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/PowerBiDevCamp" target="_blank"&gt;https://github.com/PowerBiDevCamp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 21:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1330214#M25482</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-27T21:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PBI embedded + app only auth + RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1335801#M25502</link>
      <description>&lt;P&gt;I looks like that might be the case.. Do you have any advice for an approach in my case where we'd like to offer embedded reports to our customers - we're looking at starting with one report with a dataset containing all customers' data. What is the "correct" approach for this case? One report, but with a unique dataset for each customer?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 10:18:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-PBI-embedded-app-only-auth-RLS/m-p/1335801#M25502</guid>
      <dc:creator>MichaelBluth</dc:creator>
      <dc:date>2020-08-31T10:18:43Z</dc:date>
    </item>
  </channel>
</rss>

