<?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: Power BI embedded Rest api authentication (Javascript) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedded-Rest-api-authentication-Javascript/m-p/2246740#M33541</link>
    <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MFA configuration is not controlled by PowerBI, you can disable MFA requirement for your master user following the steps described in&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates" rel="nofollow noreferrer" target="_blank"&gt;https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 05:18:36 GMT</pubDate>
    <dc:creator>V-lianl-msft</dc:creator>
    <dc:date>2021-12-20T05:18:36Z</dc:date>
    <item>
      <title>Power BI embedded Rest api authentication (Javascript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedded-Rest-api-authentication-Javascript/m-p/2240512#M33461</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the package "powerbi-client-react" to embed a PowerBI report on a react application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-c1"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pl-ent"&gt;PowerBIEmbed&lt;/SPAN&gt;
	&lt;SPAN class="pl-c1"&gt;embedConfig&lt;/SPAN&gt; &lt;SPAN class="pl-c1"&gt;=&lt;/SPAN&gt; &lt;SPAN class="pl-kos"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pl-kos"&gt;{&lt;/SPAN&gt;
		&lt;SPAN class="pl-c1"&gt;type&lt;/SPAN&gt;: &lt;SPAN class="pl-s"&gt;'report'&lt;/SPAN&gt;&lt;SPAN class="pl-kos"&gt;,&lt;/SPAN&gt;   &lt;SPAN class="pl-c"&gt;// Supported types: report, dashboard, tile, visual and qna&lt;/SPAN&gt;
		&lt;SPAN class="pl-c1"&gt;id&lt;/SPAN&gt;: '&amp;lt;Report Id&amp;gt;'&lt;SPAN class="pl-kos"&gt;,&lt;/SPAN&gt; 
		&lt;SPAN class="pl-c1"&gt;embedUrl&lt;/SPAN&gt;: '&amp;lt;Embed Url&amp;gt;'&lt;SPAN class="pl-kos"&gt;,&lt;/SPAN&gt;
		&lt;SPAN class="pl-c1"&gt;accessToken&lt;/SPAN&gt;: '&amp;lt;Access Token&amp;gt;'&lt;SPAN class="pl-kos"&gt;,&lt;/SPAN&gt;    &lt;SPAN class="pl-c"&gt;// Keep as empty string, null or undefined&lt;/SPAN&gt;
		&lt;SPAN class="pl-c1"&gt;tokenType&lt;/SPAN&gt;: &lt;SPAN class="pl-s1"&gt;models&lt;/SPAN&gt;&lt;SPAN class="pl-kos"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;TokenType&lt;/SPAN&gt;&lt;SPAN class="pl-kos"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;Embed&lt;/SPAN&gt;
	&lt;SPAN class="pl-kos"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pl-kos"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="pl-c1"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The package itself works well, but I'm having trouble getting an access token (for the organization) that works. I've configured the API permissions on our app resgistration to connect to PowerBI.&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="rubenberna_0-1639580026579.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/644423i61D556C8BCD73489/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenberna_0-1639580026579.png" alt="rubenberna_0-1639580026579.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when using this token to render the powerBI embeded, I get this network error, which suggests an invalid token:&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="rubenberna_1-1639580140959.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/644424iFDC63B44FE35FCCB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenberna_1-1639580140959.png" alt="rubenberna_1-1639580140959.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I get a token directly from the PowerBI developer console --&amp;nbsp;&lt;EM&gt;copy(powerBIAccessToken)&lt;/EM&gt; --, this token works well. But the token that we get from the MFA OAuth doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 15:08:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedded-Rest-api-authentication-Javascript/m-p/2240512#M33461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-15T15:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedded Rest api authentication (Javascript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedded-Rest-api-authentication-Javascript/m-p/2246740#M33541</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MFA configuration is not controlled by PowerBI, you can disable MFA requirement for your master user following the steps described in&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates" rel="nofollow noreferrer" target="_blank"&gt;https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 05:18:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedded-Rest-api-authentication-Javascript/m-p/2246740#M33541</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2021-12-20T05:18:36Z</dc:date>
    </item>
  </channel>
</rss>

