<?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: 400 Bad Request Creating embed token with effective identity requires dataset to be provided in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3470434#M44878</link>
    <description>&lt;P&gt;Anyone facing this issue, the error message is actually correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While passing EffectiveIdentity, you also need to pass the dataset id in the ei list as datasets:, i was missing that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;-skbg&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 06:33:39 GMT</pubDate>
    <dc:creator>skbg</dc:creator>
    <dc:date>2023-10-11T06:33:39Z</dc:date>
    <item>
      <title>400 Bad Request Creating embed token with effective identity requires dataset to be provided</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3469503#M44864</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm migrating client-code from ADAL.NET to MSAL.NET that embeds Power BI report, and what was working under ADAL.Net is failing in MSAL.Net approach. I'm unable to get the access token to a report with effective identity though I'm passing all parameters correctly. The error message 400 bad request with error is very misleading. I cannot find the reason this fails while ADAL.Net code with same parameters still works. I'm passing the SP's object id correctly as in ADAL.Net, but it fails.&lt;/P&gt;&lt;P&gt;Any idea what i'm doing wrong, kindly help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public static async Task&amp;lt;EmbedToken&amp;gt; GetEmbedToken4(Guid workspaceId, Guid reportId, string accessLevel = "view")&lt;BR /&gt;{&lt;BR /&gt;using (var pbiClient = await GetPowerBiClient())&lt;BR /&gt;{&lt;BR /&gt;var pbiReport = pbiClient.Reports.GetReportInGroup(workspaceId, reportId);&lt;BR /&gt;string dataSet = pbiReport.DatasetId.ToString();&lt;BR /&gt;// Generate token request for RDL Report&lt;BR /&gt;var generateTokenRequestParameters = new GenerateTokenRequest(&lt;BR /&gt;accessLevel: accessLevel,&lt;BR /&gt;datasetId: dataSet,&lt;BR /&gt;identities: new List&amp;lt;EffectiveIdentity&amp;gt; { new EffectiveIdentity(username: "XyZ", roles: new List&amp;lt;string&amp;gt; { "010dd4a9-a250-4968-979e-4e7bf5b65ba7" })&lt;BR /&gt;});&lt;BR /&gt;// Generate Embed token&lt;BR /&gt;var embedToken = pbiClient.Reports.GenerateTokenInGroup(workspaceId, reportId, generateTokenRequestParameters);&lt;/P&gt;&lt;P&gt;return embedToken;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 18:04:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3469503#M44864</guid>
      <dc:creator>skbg</dc:creator>
      <dc:date>2023-10-10T18:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: 400 Bad Request Creating embed token with effective identity requires dataset to be provided</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3470434#M44878</link>
      <description>&lt;P&gt;Anyone facing this issue, the error message is actually correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While passing EffectiveIdentity, you also need to pass the dataset id in the ei list as datasets:, i was missing that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;-skbg&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 06:33:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3470434#M44878</guid>
      <dc:creator>skbg</dc:creator>
      <dc:date>2023-10-11T06:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: 400 Bad Request Creating embed token with effective identity requires dataset to be provided</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3473068#M44897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/629199"&gt;@skbg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Whether your problem has been resolved? If yes, could you please mark your post as &lt;STRONG&gt;&lt;SPAN&gt;Answered&lt;/SPAN&gt;&lt;/STRONG&gt;? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 09:29:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/400-Bad-Request-Creating-embed-token-with-effective-identity/m-p/3473068#M44897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-12T09:29:19Z</dc:date>
    </item>
  </channel>
</rss>

