<?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: Problems Embedding using REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/308283#M9080</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44197"&gt;@cheesepudding&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Reading further into documentation, I noticed that Power BI Workspace Collections is going to not be avaiable soon due to the Power BI Premium release.&amp;nbsp; Are the steps the same when it comes to getting the embed token (i.e. is there going to be a group ID for my report).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44197"&gt;@cheesepudding&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Just to clarify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The legency Power BI Embedded workspace collections uses &lt;A href="https://msdn.microsoft.com/en-us/library/azure/mt712303.aspx" target="_self"&gt;a set of Azure REST APIs&lt;/A&gt;. As to authenticating and&amp;nbsp;authorizing, you can reference &lt;A href="https://docs.microsoft.com/en-us/azure/power-bi-workspace-collections/app-token-flow" target="_self"&gt;this page&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the replacement, &lt;A href="https://powerbi.microsoft.com/en-us/blog/power-bi-embedded-capacity-based-skus-coming-to-azure/" target="_self"&gt;Power BI Embedded capacity-based SKUs&lt;/A&gt;, you would get access token with the POST API in your original post and then get embed token with this API &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;GenerateToken&lt;/A&gt;. In the new PBI Embedded, you publish pbix file to Power BI service instead of to the legency Power BI Embedded workspace. So you can simply get the &lt;A href="https://docs.microsoft.com/en-us/power-bi/service-create-distribute-apps#create-an-app-workspace" target="_self"&gt;group&lt;/A&gt; id from Power BI Service site UI or you can simply get the id by calling the API&amp;nbsp;&lt;A href="https://msdn.microsoft.com/en-us/library/mt243842.aspx" target="_self"&gt;Get Groups&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/power-BI-embedded-vs-Power-BI-Rest-API/m-p/308028#M9076" target="_self"&gt;power BI embedded vs Power BI Rest API&lt;/A&gt;&amp;nbsp;for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 02:20:17 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-11-22T02:20:17Z</dc:date>
    <item>
      <title>Problems Embedding using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/307288#M9039</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to embed a report using workspace collections while utalizing row level security. I'm using javascript and hence the Power Bi REST API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that the steps are:&lt;/P&gt;&lt;P&gt;Get access token from azure AD [1] -&amp;gt; get embed token (with access parameters passed in) from power bi -&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;place embedded content on your website.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the following REST POST call to get my access token. This works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt; POST /common/oauth2/token HTTP/1.1
&amp;gt; Host: login.windows.net
&amp;gt; Content-Type: application/x-www-form-urlencoded
| client_id=&amp;lt;app_client_id&amp;gt;&amp;amp;grant_type=password&amp;amp;resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&amp;amp;username=&amp;lt;powerbi_username&amp;gt;&amp;amp;password=&amp;lt;powerbi_password&amp;gt;&amp;amp;client_secret=&amp;lt;app_client_secret&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since my report is in a workspace collection, the only things I can see using the command line is collection name, workspace ID, and report ID. In the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://msdn.microsoft.com/en-US/library/mt784614.aspx" target="_blank"&gt;following REST API call&lt;/A&gt;, you can see that it needs a group ID and a report ID. I have the report ID but not sure how to go about getting the group ID. I also understand that the row level security access is defined in the body, so I don't have a problem with the RLS part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;POST https://api.powerbi.com/v1.0/myorg/groups/{group_Id}/reports/{report_id}/GenerateToken

{   
    "accessLevel": "View",
    "identities": [     
        {      
            "username": "EffectiveIdentity",
            "roles": [ "Role1", "Role2" ],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }   
    ] 
} &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I'm generating the embed token using the powerbi CLI tool. I'm using the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;powerbi create-embed-token -c &amp;lt;collection_name&amp;gt; -k &amp;lt;access_key&amp;gt; -w &amp;lt;workspace_ID&amp;gt; -r &amp;lt;report_ID&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do embed, I get the following errors:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-11-21 at 11.01.14 am.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/70458i6FD3A5AB7848B339/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-21 at 11.01.14 am.png" alt="Screen Shot 2017-11-21 at 11.01.14 am.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-11-21 at 11.01.02 am.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/70459i5D6F818EFC794834/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-21 at 11.01.02 am.png" alt="Screen Shot 2017-11-21 at 11.01.02 am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm embedding using:&lt;/P&gt;&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;div id="reportContainer"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;script src="./node_modules/powerbi-client/dist/powerbi.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script&amp;gt;
        (function () {
            var embedToken = '&amp;lt;token from powebi create-embed-token&amp;gt;';
            var reportId = '&amp;lt;report id from workspace collections&amp;gt;';
            var embedUrl = 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=' + reportId;
            var config = {
                type: 'report',
                accessToken: embedToken,
                embedUrl: embedUrl,
                id: reportId,
                settings: {
                    filterPaneEnabled: false,
                    navContentPaneEnabled: false
                }
            };
            powerbi.embed(document.getElementById('reportContainer'), config);
        })();
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 01:09:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/307288#M9039</guid>
      <dc:creator>cheesepudding</dc:creator>
      <dc:date>2017-11-21T01:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Embedding using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/307318#M9040</link>
      <description>&lt;P&gt;Reading further into documentation, I noticed that Power BI Workspace Collections is going to not be avaiable soon due to the Power BI Premium release.&amp;nbsp; Are the steps the same when it comes to getting the embed token (i.e. is there going to be a group ID for my report).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 02:14:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/307318#M9040</guid>
      <dc:creator>cheesepudding</dc:creator>
      <dc:date>2017-11-21T02:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Embedding using REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/308283#M9080</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44197"&gt;@cheesepudding&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Reading further into documentation, I noticed that Power BI Workspace Collections is going to not be avaiable soon due to the Power BI Premium release.&amp;nbsp; Are the steps the same when it comes to getting the embed token (i.e. is there going to be a group ID for my report).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/44197"&gt;@cheesepudding&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Just to clarify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The legency Power BI Embedded workspace collections uses &lt;A href="https://msdn.microsoft.com/en-us/library/azure/mt712303.aspx" target="_self"&gt;a set of Azure REST APIs&lt;/A&gt;. As to authenticating and&amp;nbsp;authorizing, you can reference &lt;A href="https://docs.microsoft.com/en-us/azure/power-bi-workspace-collections/app-token-flow" target="_self"&gt;this page&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the replacement, &lt;A href="https://powerbi.microsoft.com/en-us/blog/power-bi-embedded-capacity-based-skus-coming-to-azure/" target="_self"&gt;Power BI Embedded capacity-based SKUs&lt;/A&gt;, you would get access token with the POST API in your original post and then get embed token with this API &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;GenerateToken&lt;/A&gt;. In the new PBI Embedded, you publish pbix file to Power BI service instead of to the legency Power BI Embedded workspace. So you can simply get the &lt;A href="https://docs.microsoft.com/en-us/power-bi/service-create-distribute-apps#create-an-app-workspace" target="_self"&gt;group&lt;/A&gt; id from Power BI Service site UI or you can simply get the id by calling the API&amp;nbsp;&lt;A href="https://msdn.microsoft.com/en-us/library/mt243842.aspx" target="_self"&gt;Get Groups&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/power-BI-embedded-vs-Power-BI-Rest-API/m-p/308028#M9076" target="_self"&gt;power BI embedded vs Power BI Rest API&lt;/A&gt;&amp;nbsp;for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 02:20:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problems-Embedding-using-REST-API/m-p/308283#M9080</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-11-22T02:20:17Z</dc:date>
    </item>
  </channel>
</rss>

