<?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 REST API using postman - generate embed token. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310153#M9157</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/42364"&gt;@insoldev&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello - currently working through trying to get an embed token using the Power BI rest api. I am following the guidance as on this page. &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;https://msdn.microsoft.com/en-us/library/mt784614.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ultimately, I am trying to achieve the outcome of using javascript to host a Power BI report in the new model as per &lt;A href="https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734" target="_self"&gt;https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734&lt;/A&gt;&amp;nbsp;as per&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&amp;nbsp;suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not getting an embed token - I am simply getting this response. Clearly I've missed something - I am using my &lt;STRONG&gt;client secret&lt;/STRONG&gt; as the bearer token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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/42364"&gt;@insoldev&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The bearer token requires an &lt;STRONG&gt;access token&lt;/STRONG&gt;, not the client secret. You need to follow &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/register-app" target="_self"&gt;this link&lt;/A&gt; to register a &lt;STRONG&gt;Native app&lt;/STRONG&gt; rather than a server-side&amp;nbsp;web app for Power BI Embedded cases and &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/register-app#apply-permissions-to-your-application-within-azure-ad" target="_self"&gt;grant sufficient permissions&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then to get the access token, you can call the POST API in POSTMAN as&lt;/P&gt;
&lt;PRE&gt;POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Cache-Control: no-cache 
Content-Type: application/x-www-form-urlencoded

client_id={client id}&amp;amp;grant_type=password&amp;amp;resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&amp;amp;username={your power bi account}&amp;amp;password={your Power BI password}&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/71134i01642EB94D357B82/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the above access_token, you can call the &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;GenerateToken&lt;/A&gt; API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, using POSTMAN is recommended for testing/debug purpose, what would you like in your case?&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2017 08:03:48 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-11-24T08:03:48Z</dc:date>
    <item>
      <title>Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310054#M9154</link>
      <description>&lt;P&gt;Hello - currently working through trying to get an embed token using the Power BI rest api. I am following the guidance as on this page. &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;https://msdn.microsoft.com/en-us/library/mt784614.aspx&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ultimately, I am trying to achieve the outcome of using javascript to host a Power BI report in the new model as per &lt;A href="https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734" target="_self"&gt;https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734&lt;/A&gt;&amp;nbsp;as per&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&amp;nbsp;suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting an embed token - I am simply getting this response. Clearly I've missed something - I am using my client secret as the bearer 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="postman body.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/71107iEB79730477457667/image-size/large?v=v2&amp;amp;px=999" role="button" title="postman body.PNG" alt="postman body.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 20:31:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310054#M9154</guid>
      <dc:creator>insoldev</dc:creator>
      <dc:date>2017-11-23T20:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310153#M9157</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/42364"&gt;@insoldev&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello - currently working through trying to get an embed token using the Power BI rest api. I am following the guidance as on this page. &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;https://msdn.microsoft.com/en-us/library/mt784614.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ultimately, I am trying to achieve the outcome of using javascript to host a Power BI report in the new model as per &lt;A href="https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734" target="_self"&gt;https://community.powerbi.com/t5/Developer/Embedding-without-hard-coding-master-credentials-app-owns-data/m-p/296611#M8734&lt;/A&gt;&amp;nbsp;as per&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&amp;nbsp;suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not getting an embed token - I am simply getting this response. Clearly I've missed something - I am using my &lt;STRONG&gt;client secret&lt;/STRONG&gt; as the bearer token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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/42364"&gt;@insoldev&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The bearer token requires an &lt;STRONG&gt;access token&lt;/STRONG&gt;, not the client secret. You need to follow &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/register-app" target="_self"&gt;this link&lt;/A&gt; to register a &lt;STRONG&gt;Native app&lt;/STRONG&gt; rather than a server-side&amp;nbsp;web app for Power BI Embedded cases and &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/register-app#apply-permissions-to-your-application-within-azure-ad" target="_self"&gt;grant sufficient permissions&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then to get the access token, you can call the POST API in POSTMAN as&lt;/P&gt;
&lt;PRE&gt;POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Cache-Control: no-cache 
Content-Type: application/x-www-form-urlencoded

client_id={client id}&amp;amp;grant_type=password&amp;amp;resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&amp;amp;username={your power bi account}&amp;amp;password={your Power BI password}&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/71134i01642EB94D357B82/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the above access_token, you can call the &lt;A href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self"&gt;GenerateToken&lt;/A&gt; API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, using POSTMAN is recommended for testing/debug purpose, what would you like in your case?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 08:03:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310153#M9157</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-11-24T08:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/313712#M9279</link>
      <description>&lt;P&gt;Thanks for your response - I'm just testing to make sure I have the components working correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 10:58:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/313712#M9279</guid>
      <dc:creator>insoldev</dc:creator>
      <dc:date>2017-11-29T10:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/518730#M16027</link>
      <description>&lt;P&gt;&lt;SPAN&gt;First I would like&amp;nbsp;to say sorry that I don't have an exact solution about this but I feel like that Whatever I will suggest here it would be helpful or it will work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just go through the article &lt;A href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_self"&gt;REST API in Power BI&lt;/A&gt;&amp;nbsp;where all things are described in the wonderful and easy way. Diagrams and video are also available in this article which will help to learn in a more easier way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 11:37:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/518730#M16027</guid>
      <dc:creator>Yikun</dc:creator>
      <dc:date>2018-09-18T11:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/518734#M16028</link>
      <description>&lt;P&gt;First I would like to say sorry that I don't have an exact solution about this but I feel like that Whatever I will suggest here it would be helpful or it will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just go through the article&lt;A href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_self"&gt;&lt;STRONG&gt; REST API in Power BI&lt;/STRONG&gt;&lt;/A&gt; where all things are described in the wonderful and easy way. Diagrams and video are also available in this article which will help to learn in a more easier way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it Helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 11:45:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/518734#M16028</guid>
      <dc:creator>Yikun</dc:creator>
      <dc:date>2018-09-18T11:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/519911#M16063</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/82397"&gt;@Yikun&lt;/a&gt;, that isn't even close to relevant - I'm talking about using the Power BI API in an embedded application, not using an API as a data source in Power BI.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 13:25:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/519911#M16063</guid>
      <dc:creator>insoldev</dc:creator>
      <dc:date>2018-09-19T13:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/519976#M16064</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&amp;nbsp;- I wanted to thank you for your contribution. This worked for me and gave me a really good steer. I have used Azure Functions apps to provide the server side functionality.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 13:24:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/519976#M16064</guid>
      <dc:creator>insoldev</dc:creator>
      <dc:date>2018-09-19T13:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/546231#M16994</link>
      <description>&lt;P&gt;I am getting this response from Postman:&lt;/P&gt;&lt;PRE&gt;"error": "invalid_grant", "error_description": "AADSTS70002: Error validating credentials. AADSTS50126: Invalid username or password\r\nTrace ID: c3c862a5-440b-43ba-a105-7efea28b2800\r\nCorrelation ID: 7df5b009-805a-4738-8c81-b9eca778054a\r\nTimestamp: 2018-10-18 20:14:11Z", "error_codes": [ 70002, 50126 ],&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I know my login/pw are good because if I use the same credentials/client_id with the Python library PyPowerBi (&lt;A href="https://github.com/cmberryau/pypowerbi" target="_blank"&gt;https://github.com/cmberryau/pypowerbi&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can connect and make API calls, so the problem has to be with the Postman setup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;: &lt;A href="https://login.microsoftonline.com/common/oauth2/token" target="_blank"&gt;https://login.microsoftonline.com/common/oauth2/token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BODY&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;grant_type:password&lt;/P&gt;&lt;P&gt;client_id:{{client_id}}&lt;/P&gt;&lt;P&gt;resource:&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;scope:openid&lt;/P&gt;&lt;P&gt;username:{{username}}&lt;/P&gt;&lt;P&gt;password:{{password}}&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 20:24:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/546231#M16994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T20:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/708936#M19589</link>
      <description>&lt;P&gt;Thank you so much, was able to get the access_token using this method in postman.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you say "&lt;SPAN&gt;With the above access_token, you can call the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="" href="https://msdn.microsoft.com/en-us/library/mt784614.aspx" target="_self" rel="nofollow noopener noreferrer"&gt;GenerateToken&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;API.", can you give us an example of how we would use the access_token from the call to&amp;nbsp;&lt;A href="https://login.windows.net/common/oauth2/token" target="_blank" rel="noopener"&gt;https://login.windows.net/common/oauth2/token&lt;/A&gt; to one of the post methods?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, I am trying to embed a report in .net core.&amp;nbsp; I want to use this rest api method:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken/reports_generatetokeningroup" target="_blank" rel="noopener"&gt;Reports GenerateTokenInGroup&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;POST &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with some parameters (accessLevel,&amp;nbsp;allowSaveAs,&amp;nbsp;datasetId,&amp;nbsp;identities) in the request body.&amp;nbsp; How would I use the access_token from the first API call with the second one (POST &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/GenerateToken&lt;/A&gt;)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 23:15:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/708936#M19589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-06T23:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/1042391#M23278</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;did you find a solution to this, are you able to share a common approach for postman?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 18:57:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/1042391#M23278</guid>
      <dc:creator>Oex</dc:creator>
      <dc:date>2020-04-22T18:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3034145#M40834</link>
      <description>&lt;P&gt;Above solution only mentioned &lt;SPAN&gt;using Master User account to authenticate and get access token, in the request body we need provide username and password, Request URL is&amp;nbsp;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Ftoken&amp;amp;data=05%7C01%7Cjerry.tang%40microsoft.com%7C23f0272460cc46938fcd08dafa222dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638097322124885572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=VgDxOqmr%2FrIyzlsgeMcAY1mFGx8VaNRakkmZgYsBzmo%3D&amp;amp;reserved=0" target="_blank"&gt;https://login.microsoftonline.com/common/oauth2/token&lt;/A&gt;. Actually we can use either&amp;nbsp;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Ftoken&amp;amp;data=05%7C01%7Cjerry.tang%40microsoft.com%7C23f0272460cc46938fcd08dafa222dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638097322124885572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=VgDxOqmr%2FrIyzlsgeMcAY1mFGx8VaNRakkmZgYsBzmo%3D&amp;amp;reserved=0" target="_blank"&gt;https://login.microsoftonline.com/common/oauth2/token&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flogin.microsoftonline.com%2F%257BtenantID%257D%2Foauth2%2Fv2.0%2Ftoken&amp;amp;data=05%7C01%7Cjerry.tang%40microsoft.com%7C23f0272460cc46938fcd08dafa222dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638097322124885572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=YcMdvQXOboX%2FYGnPIilcZy%2Bh%2FMFMlwxqZGwh71NxBU0%3D&amp;amp;reserved=0" target="_blank"&gt;https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token&lt;/A&gt; for master user.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note: we need replace "{tenantID}" with cx tenant ID.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Furthermore, we can also use&amp;nbsp;&lt;STRONG&gt;Service Principal&lt;/STRONG&gt; to authenticate and get access token: the request URL can only be&amp;nbsp;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flogin.microsoftonline.com%2F%257BtenantID%257D%2Foauth2%2Fv2.0%2Ftoken&amp;amp;data=05%7C01%7Cjerry.tang%40microsoft.com%7C23f0272460cc46938fcd08dafa222dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638097322124885572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=YcMdvQXOboX%2FYGnPIilcZy%2Bh%2FMFMlwxqZGwh71NxBU0%3D&amp;amp;reserved=0" target="_blank"&gt;https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the request body, we need set grant_type as client_credentials, and provide client_id and client_secret. After&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#step-1---create-an-azure-ad-app" target="_blank" rel="noopener"&gt;Create an Azure AD app,&lt;/A&gt;&amp;nbsp;we will have Application ID(client_id) and secret.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JerryTang_0-1674224888531.png" style="width: 745px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/859083iD482CAD963AD5BD8/image-dimensions/745x254?v=v2" width="745" height="254" role="button" title="JerryTang_0-1674224888531.png" alt="JerryTang_0-1674224888531.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 14:34:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3034145#M40834</guid>
      <dc:creator>Jerry-Tang</dc:creator>
      <dc:date>2023-01-20T14:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3048093#M40945</link>
      <description>&lt;P&gt;what is cx tenant ID&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 23:42:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3048093#M40945</guid>
      <dc:creator>zmorlan</dc:creator>
      <dc:date>2023-01-27T23:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3048246#M40947</link>
      <description>&lt;P&gt;&lt;A href="https://techcommunity.microsoft.com/t5/office-365/how-do-you-find-the-tenant-id/m-p/89023#M4223" target="_blank"&gt;Re: How do you find the tenant ID? - Microsoft Community Hub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 09:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3048246#M40947</guid>
      <dc:creator>Jerry-Tang</dc:creator>
      <dc:date>2023-01-28T09:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3383039#M43923</link>
      <description>&lt;P&gt;Hi jerry,&lt;/P&gt;&lt;P&gt;I am trying the same in postman. but with this token I am not able to generate embed token in postman.&lt;/P&gt;&lt;P&gt;sharing response which I am getting when generating access token. can please confirm this is the correct response and you are getting the same.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Burhan_Jiru_0-1692197874697.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/956183i16E4592FBBED5E01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Burhan_Jiru_0-1692197874697.png" alt="Burhan_Jiru_0-1692197874697.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If this is the correct response can you please guide me on how to generate embed token in Postman?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 14:59:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3383039#M43923</guid>
      <dc:creator>Burhan_Jiru</dc:creator>
      <dc:date>2023-08-16T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3440322#M44572</link>
      <description>&lt;P&gt;Hello, I am getting the same error. Did you manage to make this work yet with client credentials?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 16:24:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3440322#M44572</guid>
      <dc:creator>arthurviana</dc:creator>
      <dc:date>2023-09-20T16:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3442874#M44623</link>
      <description>&lt;P&gt;I'm facing some troubles in&amp;nbsp;to replicate what has been done here.&lt;/P&gt;&lt;P&gt;I had already register the app on Azure AD and create the workspace in Power BI as mention here:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/register-app?tabs=customers" target="_blank"&gt;Get started with Power BI Embedded - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I use your steps to get access token by Postman, I receive that the hostname is not correct:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ivanSantos16_0-1695380320587.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/972186i5A9737162B57A9E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ivanSantos16_0-1695380320587.png" alt="ivanSantos16_0-1695380320587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me please?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 10:59:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3442874#M44623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-22T10:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3835984#M51738</link>
      <description>&lt;P&gt;Hey can anyone help me on this i already generate token for the same ,&amp;nbsp; but when i am using the same token to get power bi pipeline it through an error in power automate :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"error":{"code":"ALM_InvalidRequest_AccessToPipelineDenied","pbi.error":{"code":"ALM_InvalidRequest_AccessToPipelineDenied","parameters":{},"details":[],"exceptionCulprit":1}}}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tell me why , i already grant all the permissiion from azure AD&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 05:54:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3835984#M51738</guid>
      <dc:creator>gauravraj269</dc:creator>
      <dc:date>2024-04-14T05:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API using postman - generate embed token.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3917028#M52447</link>
      <description>&lt;P&gt;Hi, i am able to create access token but when i create workspace in powerbi its creating but its creating under service principle as admin, but when i create workspace with the token what i got from try it in microsoft its creating workspace under my name, how to get access token which creates workspace under my name as admin and not unser service principle. please give me an solution asap, thanks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chakri1431_0-1715683342484.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097833i91097FE580C3A7F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chakri1431_0-1715683342484.png" alt="chakri1431_0-1715683342484.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chakri1431_0-1715683691461.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097839iE90250DE05E2AE2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chakri1431_0-1715683691461.png" alt="chakri1431_0-1715683691461.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 10:49:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/3917028#M52447</guid>
      <dc:creator>chakri1431</dc:creator>
      <dc:date>2024-05-14T10:49:12Z</dc:date>
    </item>
  </channel>
</rss>

