<?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: How to get EmbedToken Generated ? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4130590#M55081</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/95796"&gt;@uaydogdu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try to call t&lt;SPAN&gt;he Power BI API resource url for accress token : "&lt;/SPAN&gt;&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank" rel="noopener nofollow noreferrer"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;SPAN&gt;".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For reference:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/REST-API-Get-Access-Token/m-p/1895937" target="_blank" rel="noopener"&gt;Solved: REST API Get Access Token - Microsoft Fabric Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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>Tue, 03 Sep 2024 07:03:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-03T07:03:25Z</dc:date>
    <item>
      <title>How to get EmbedToken Generated ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4128430#M55052</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;we have difficulty in getting EmbedToken.&lt;/P&gt;&lt;P&gt;1. We can get AccessToken calling &lt;SPAN&gt;&lt;A href="https://login.microsoftonline.com/common/oauth2/token" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/common/oauth2/token &amp;nbsp;&lt;/A&gt; with "grant-type:password"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Using AccessToken from first step we&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;3. Altough we give all permissions to the user ,We get&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"code"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Unauthorized"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Report.Read.All Dataset.Read.All"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;4. We logged in to &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/reports-generate-token-in-group#code-try-0" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/reports-generate-token-in-group#code-try-0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;with the user account that we use to get the AccessToken (first step)&lt;/P&gt;&lt;P&gt;5. We are able to get EmbedToken.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the difference between the AccessTokens getting at the first and the fourth steps?&lt;/P&gt;&lt;P&gt;Any help appreciated&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2024 21:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4128430#M55052</guid>
      <dc:creator>uaydogdu</dc:creator>
      <dc:date>2024-09-01T21:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get EmbedToken Generated ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4128526#M55058</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/95796"&gt;@uaydogdu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;What would be the difference between the AccessTokens getting at the first and the fourth steps?&lt;/LI-CODE&gt;
&lt;P&gt;Firstly, you will get Entra ID Token (Access Token) by Master User (Account and Password) or Service principal as authentication.&lt;/P&gt;
&lt;P&gt;Then you will use this access token to get Embed token in below step.&lt;/P&gt;
&lt;P&gt;So they are different.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_0-1725240506352.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1160479iFC3251DA0A85CF4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_0-1725240506352.png" alt="vrzhoumsft_0-1725240506352.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You may refer to workload and offical blog for more details.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-tokens?tabs=embed-for-customers" target="_blank"&gt;Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For reference:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/generate-embed-token" target="_blank"&gt;Generate an embed token in Power BI embedded analytics - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As far as I know, here you are using master user (password) as authentication.&lt;/P&gt;
&lt;P&gt;I think you need to give permissions as below when you register your Microsoft Entra application.&lt;/P&gt;
&lt;P&gt;All of the following, unless a requirement doesn't apply:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Report.ReadWrite.All or Report.Read.All&lt;/LI&gt;
&lt;LI&gt;Dataset.ReadWrite.All or Dataset.Read.All&lt;/LI&gt;
&lt;LI&gt;Content.Create, required if the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;allowSaveAs&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;flag is specified in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/reports-generate-token-for-create-in-group#generatetokenrequest" data-linktype="absolute-path" target="_blank"&gt;GenerateTokenRequest&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-core#step-2---register-a-microsoft-entra-application" target="_blank"&gt;Embed content in your Power BI embedded analytics application - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 01:37:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4128526#M55058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-02T01:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get EmbedToken Generated ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4129260#M55065</link>
      <description>&lt;P&gt;Dear Rico ,&lt;/P&gt;&lt;P&gt;First of all, Thank you very much for your quick response. As far as I understand you explain the differences between Entra ID Token and Embed Token and how to obtain them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question was , we get Entra ID Token (Access Token)&amp;nbsp; by 2 ways&amp;nbsp; with the same master user account. First Way cannot generate Embed Token and the second way does generate, What is missing with first way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st Way.&amp;nbsp; Calling Api (&lt;STRONG&gt; &lt;SPAN&gt;&lt;A href="https://login.microsoftonline.com/common/oauth2/token" target="_blank" rel="noopener nofollow noreferrer"&gt;https://login.microsoftonline.com/common/oauth2/token ) &lt;/A&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2nd Way.&amp;nbsp; Login Api Playground &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/reports-generate-token-in-group" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/reports-generate-token-in-group&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Copied "Authorization" .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uaydogdu_1-1725266949104.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1160770iCDA4767A7F74ECCC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uaydogdu_1-1725266949104.png" alt="uaydogdu_1-1725266949104.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 09:21:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4129260#M55065</guid>
      <dc:creator>uaydogdu</dc:creator>
      <dc:date>2024-09-02T09:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get EmbedToken Generated ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4130590#M55081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/95796"&gt;@uaydogdu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try to call t&lt;SPAN&gt;he Power BI API resource url for accress token : "&lt;/SPAN&gt;&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank" rel="noopener nofollow noreferrer"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;SPAN&gt;".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For reference:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/REST-API-Get-Access-Token/m-p/1895937" target="_blank" rel="noopener"&gt;Solved: REST API Get Access Token - Microsoft Fabric Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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>Tue, 03 Sep 2024 07:03:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4130590#M55081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-03T07:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get EmbedToken Generated ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4136299#M55142</link>
      <description>&lt;P&gt;Dear Rico ,&lt;/P&gt;&lt;P&gt;We've already call &lt;STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank" rel="noopener nofollow noreferrer"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/STRONG&gt; to get access token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;On application registration we gave full control for the master user to the app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uaydogdu_1-1725576571831.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1163033iB03901D10475100D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uaydogdu_1-1725576571831.png" alt="uaydogdu_1-1725576571831.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;On our postman response we get Report.Read.All as scope.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uaydogdu_3-1725577451394.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1163035i6F57D62E9D98ECC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uaydogdu_3-1725577451394.png" alt="uaydogdu_3-1725577451394.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the "Report.Read.All" enough for getting Embed Token?&lt;/P&gt;&lt;P&gt;What could be the reason we dont see the rest of the scope items in response?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance,&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 23:05:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-get-EmbedToken-Generated/m-p/4136299#M55142</guid>
      <dc:creator>uaydogdu</dc:creator>
      <dc:date>2024-09-05T23:05:03Z</dc:date>
    </item>
  </channel>
</rss>

