<?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: Update embed token using  javascript in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/919728#M22193</link>
    <description>&lt;P&gt;Does anybody have an example for this?&lt;/P&gt;&lt;P&gt;I am having the same issue and dont understand how shoul;d i implement the&amp;nbsp;generateEmbedToken function&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2020 14:17:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-03T14:17:46Z</dc:date>
    <item>
      <title>Update embed token using  javascript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/417100#M12413</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am embeding power bi reports on my website using APPS OWNED DATA.&lt;/P&gt;&lt;P&gt;Steps which I have followed is&lt;/P&gt;&lt;P&gt;1. Get Access token - Using&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://login.microsoftonline.com/common/oauth2/token" target="_blank"&gt;https://login.microsoftonline.com/common/oauth2/token&lt;/A&gt; REST API&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Get Embed token - Using&amp;nbsp; &lt;A target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/&amp;lt;id&amp;gt;/reports/&amp;lt;id&amp;gt;/GenerateToken&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After getting embed token rest everything works as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Embed token expires after certain time interval, I wanted to know how can I update embed token using JavaScript?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I followed this article&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Refresh-token-using-JavaScript-SDK-example" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Refresh-token-using-JavaScript-SDK-example&lt;/A&gt; and I got following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Uncaught ReferenceError: generateEmbedToken is not defined&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 23:27:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/417100#M12413</guid>
      <dc:creator>kpratik</dc:creator>
      <dc:date>2018-05-14T23:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update embed token using  javascript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/419135#M12500</link>
      <description>&lt;P&gt;Where did you put the refresh token example in your code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the document statys, the generateEmbedToken is a function you need to implement with.&lt;/P&gt;&lt;P&gt;Basically, the generateEmbedToken should follow the scenario of the GenerateToken function,&amp;nbsp;and you need to get the AccessToken first:&lt;/P&gt;&lt;P&gt;GenerateToken&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/library/mt784614.aspx" target="_blank"&gt;https://msdn.microsoft.com/library/mt784614.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't found any code sample for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 02:12:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/419135#M12500</guid>
      <dc:creator>v-micsh-msft</dc:creator>
      <dc:date>2018-05-17T02:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update embed token using  javascript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/919728#M22193</link>
      <description>&lt;P&gt;Does anybody have an example for this?&lt;/P&gt;&lt;P&gt;I am having the same issue and dont understand how shoul;d i implement the&amp;nbsp;generateEmbedToken function&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 14:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/919728#M22193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-03T14:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Update embed token using  javascript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/1995720#M30893</link>
      <description>&lt;P&gt;It all depends on your setup and where you generate your tokens.&lt;BR /&gt;&lt;BR /&gt;If using PowerBI embedded, you probably have a backend to handle token generation and token refresh, so you'll have to make a POST request to your back-end endpoint with the reportId (and maybe groupId) and that should return your new token data.&lt;BR /&gt;&lt;BR /&gt;I don't think you can get an embed token dynamically from the endpoint you mentioned at point 2 in the initial post, which I believe is what you're trying to get an example for.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 15:22:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-embed-token-using-javascript/m-p/1995720#M30893</guid>
      <dc:creator>AndreiPopa</dc:creator>
      <dc:date>2021-08-03T15:22:17Z</dc:date>
    </item>
  </channel>
</rss>

