<?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: HttpOperationException: Operation returned an invalid status code 'BadRequest' in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3240016#M42714</link>
    <description>&lt;P&gt;Resolved after creating a New Workspace and Dataset. There were some issues with the Dataset due to which it returned a Bad Request&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 11:07:48 GMT</pubDate>
    <dc:creator>bytesizetrainer</dc:creator>
    <dc:date>2023-05-17T11:07:48Z</dc:date>
    <item>
      <title>HttpOperationException: Operation returned an invalid status code 'BadRequest'</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3238337#M42700</link>
      <description>&lt;P&gt;I have created a .NET Core MVC App, but not able to get it running. It returns the subject error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Microsoft.PowerBI.Api.EmbedTokenOperations.GenerateTokenWithHttpMessagesAsync(GenerateTokenRequestV2 requestParameters, Dictionary&amp;lt;string, List&amp;lt;string&amp;gt;&amp;gt; customHeaders, CancellationToken cancellationToken)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Azure Logs, I am able to trace the connection request to the Application have happened successfully, but the Token Generation does not happen. What could I be missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After viewing few blogs, I have added identity details before token generation to my Services -&amp;gt; Service.cs file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var effectiveIdentities = new List&amp;lt;EffectiveIdentity&amp;gt;();
            foreach (var dataset in datasets)
            {
                    effectiveIdentities.Add(new EffectiveIdentity(
                        username: "my_email_address",
                        datasets: new List&amp;lt;string&amp;gt; { dataset.Id.ToString() }
                    ));
            }

            // Bundle token requests for reports, datasets, and the workspace
            var tokenRequest = new GenerateTokenRequestV2(
                reports: reportTokenRequests,
                datasets: datasetTokenRequests,
                targetWorkspaces: workspaceRequests,
                identities: effectiveIdentities
            );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 15:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3238337#M42700</guid>
      <dc:creator>bytesizetrainer</dc:creator>
      <dc:date>2023-05-16T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: HttpOperationException: Operation returned an invalid status code 'BadRequest'</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3238400#M42701</link>
      <description>&lt;P&gt;Tried troubleshooting using Fiddle, but did not throw up any error. While troubleshooting through browser, it shows Internal Server Error : Error Code 500&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 16:22:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3238400#M42701</guid>
      <dc:creator>bytesizetrainer</dc:creator>
      <dc:date>2023-05-16T16:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: HttpOperationException: Operation returned an invalid status code 'BadRequest'</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3240016#M42714</link>
      <description>&lt;P&gt;Resolved after creating a New Workspace and Dataset. There were some issues with the Dataset due to which it returned a Bad Request&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 11:07:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/HttpOperationException-Operation-returned-an-invalid-status-code/m-p/3240016#M42714</guid>
      <dc:creator>bytesizetrainer</dc:creator>
      <dc:date>2023-05-17T11:07:48Z</dc:date>
    </item>
  </channel>
</rss>

