<?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: embedToken GenerateTokenAsync returning BadRequest error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2288271#M33923</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/351541"&gt;@itz4blitz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the error message, it seems that there is a problem in generating and getting the token. Are you using the embed analytics solution&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-analytics-power-bi#embed-for-your-customers" data-linktype="self-bookmark" target="_blank"&gt;Embed for your customers&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;? If so, please check if you hit any of the consideration in the document below. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/generate-embed-token#token-permissions" target="_self"&gt;&lt;STRONG&gt;Considerations when generating an embed token&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1642491081409.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/657342iBCE0C3D469CD436B/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1642491081409.png" alt="yingyinr_0-1642491081409.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#considerations-and-limitations" target="_self"&gt;&lt;STRONG&gt;Considerations and limitations&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In addition, please review the solution in the following links. Hope they can help you resolve the problem.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/400-Bad-Request-Error-when-embedding-report/m-p/1060029" target="_self"&gt;&lt;STRONG&gt;400 Bad Request Error when embedding report&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/67525926/power-bi-embedded-with-roles-allowing-row-level-security" target="_self"&gt;&lt;STRONG&gt;Power BI Embedded with Roles, allowing Row Level Security&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2022 07:34:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-01-18T07:34:48Z</dc:date>
    <item>
      <title>embedToken GenerateTokenAsync returning BadRequest error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2281656#M33868</link>
      <description>&lt;P&gt;I'm following the &lt;A href="https://docs.microsoft.com/en-us/power-bi/learning-catalog/developer-online-course" target="_self"&gt;Power BI Developer In A Day course&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've went back over the videos and my settings several times:&lt;BR /&gt;&lt;BR /&gt;I have a brand new E3 trial account.&lt;/P&gt;&lt;P&gt;I have imported the Sales Reports pbix into BI&lt;/P&gt;&lt;P&gt;I've created the appropriate "Power BI Apps" Group in Azure AD&lt;/P&gt;&lt;P&gt;In App Registrations I've setup "Sales Reporting" and configured the appropriate Certificate &amp;amp; Secret.&lt;/P&gt;&lt;P&gt;In PowerBI Admin; I've set the proper permissions under Developer Options&lt;/P&gt;&lt;P&gt;The AzureAD and PowerBi lines in my appsettings.json are configured with the correct Instance, Domain, TenantId, ClientId, ClientSecret, and WorkspaceId.&lt;BR /&gt;&lt;BR /&gt;When the code calls GetReportsEmbeddingData in the provided PowerBiApiService class (included in the DevKit), I hit this error when building my MVC app and running. I've set a breakpoint and was able to see the EmbeddedReport object gets passed in with valid data.&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="itz4blitz_0-1642078670263.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/655717iF101C3CA606D9A0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="itz4blitz_0-1642078670263.png" alt="itz4blitz_0-1642078670263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was going to try catch the error but I wasn't certain how to handle or convert the exception properly.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 13:29:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2281656#M33868</guid>
      <dc:creator>itz4blitz</dc:creator>
      <dc:date>2022-01-13T13:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: embedToken GenerateTokenAsync returning BadRequest error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2281664#M33869</link>
      <description>&lt;P&gt;In case it helps: I'm on &lt;A href="https://www.youtube.com/watch?v=BxxjpCk5z-s&amp;amp;list=PL1N57mwBHtN1AGWHnJMhtvJCIG_IlC07D&amp;amp;index=12" target="_self"&gt;Module 4, Video 2&lt;/A&gt;. I've taken all of the steps outlined in the series so far and am attempting to view the report I've embedded into the view.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 13:09:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2281664#M33869</guid>
      <dc:creator>itz4blitz</dc:creator>
      <dc:date>2022-01-13T13:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: embedToken GenerateTokenAsync returning BadRequest error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2288271#M33923</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/351541"&gt;@itz4blitz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the error message, it seems that there is a problem in generating and getting the token. Are you using the embed analytics solution&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-analytics-power-bi#embed-for-your-customers" data-linktype="self-bookmark" target="_blank"&gt;Embed for your customers&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;? If so, please check if you hit any of the consideration in the document below. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/generate-embed-token#token-permissions" target="_self"&gt;&lt;STRONG&gt;Considerations when generating an embed token&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1642491081409.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/657342iBCE0C3D469CD436B/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1642491081409.png" alt="yingyinr_0-1642491081409.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#considerations-and-limitations" target="_self"&gt;&lt;STRONG&gt;Considerations and limitations&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In addition, please review the solution in the following links. Hope they can help you resolve the problem.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/400-Bad-Request-Error-when-embedding-report/m-p/1060029" target="_self"&gt;&lt;STRONG&gt;400 Bad Request Error when embedding report&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/67525926/power-bi-embedded-with-roles-allowing-row-level-security" target="_self"&gt;&lt;STRONG&gt;Power BI Embedded with Roles, allowing Row Level Security&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 07:34:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embedToken-GenerateTokenAsync-returning-BadRequest-error/m-p/2288271#M33923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-18T07:34:48Z</dc:date>
    </item>
  </channel>
</rss>

