<?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: Authenticate REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2512997#M36088</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/331223"&gt;@Tweeg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please check if it hit any following &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#considerations-and-limitations" target="_self"&gt;limitation&lt;/A&gt;s of using service principal just as the situation in the below threads:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1652433190429.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/714363i57521E8BC7A501AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1652433190429.png" alt="yingyinr_0-1652433190429.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/Error-while-executing-Get-dataset-call-quot-API-is-not/m-p/906725" target="_self"&gt;&lt;SPAN&gt;Error while executing Get dataset call "API is not accessible for application"&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;I was able to find the reason why. This was because I was trying to work on the data form My Org and this is a limitation in the Service Principal method:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Considerations and limitations&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Service principal only works with&amp;nbsp;&lt;A href="https://urldefense.com/v3/__https:/docs.microsoft.com/en-us/power-bi/service-create-the-new-workspaces__;!!IktuQFw!k8eYjsWCxgUuIlH5np_1qV989m_6Y5Ug8zJrsHewib5gjn4ur-PDqS1YBzpXhQ$" target="_blank" rel="nofollow noopener noreferrer"&gt;new workspaces&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;My Workspace&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;isn't supported when using service principal.&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In addition, please check if you have the similar status with the following threads. If yes, you can refer their solution to fix your problem...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/67259841/powerbi-api-error-updating-dataset-using-service-principal" target="_self"&gt;PowerBI API error updating Dataset using Service Principal&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The URL in the Microsoft API documentation is wrong for service principals.&lt;/P&gt;
&lt;P&gt;You need to also include the workspace ID in the URL, see below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;https://api.powerbi.com/v1.0/myorg/groups/{WorkspaceID}/datasets/{DatasetId}refreshes&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Power-Bi-REST-API-401-Authorization-error-when-using-Service/m-p/627827" target="_self"&gt;Power Bi REST API - 401 Authorization error when using Service Principals&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2022 09:17:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-13T09:17:59Z</dc:date>
    <item>
      <title>Authenticate REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2499906#M35956</link>
      <description>&lt;P class=""&gt;It looks like changes were made to the&lt;SPAN&gt;&amp;nbsp;REST API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;The 'Try it' function from the page is gone so I tried do do it myself using Postman.&lt;/P&gt;&lt;P class=""&gt;When authenticating with my service principle, a lot of API calls give me the following response: "Message": "API is not accessible for application".&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So I have been trying to authenticate with my personal (admin) account, but how to do this is nowhere to be found in the documentation.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I found a workaround (open the PowerBI service in Chrome, then open a workspace and take the bearer token from the Developer Tools in chrome). But that can't be the way.&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 16:41:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2499906#M35956</guid>
      <dc:creator>Tweeg</dc:creator>
      <dc:date>2022-05-07T16:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2503427#M36006</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/331223"&gt;@Tweeg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Actually, it is a known issue. The Power BI team is aware of this issue and is working on a fix. Y&lt;SPAN&gt;ou can test the API by using an external API testing tool&lt;/SPAN&gt;, such as the one you mentioned: Postman. There is no exact date for a solution yet, but I will update you with any progress later. You can check the following official documentation for details on this known issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/troubleshoot/known-issues/known-issue-169-try-it-button-missing" target="_self"&gt;Known issue - Try it button missing on REST API pages&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regarding the authorization issue you mentioned, you can refer to the below methods in &lt;A href="https://community.powerbi.com/t5/Developer/Power-BI-REST-API-quot-Try-It-quot-feature-GONE/td-p/2446359/page/2" target="_self"&gt;&lt;STRONG&gt;this thread&lt;/STRONG&gt;&lt;/A&gt; to resolve it.&lt;/P&gt;
&lt;P&gt;1. Call &lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;A 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&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/td-p/310054" target="_self"&gt;&lt;SPAN&gt;Power BI REST API using postman - generate embed token.&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;1) You will likely need to create the App registration FOR YOUR ORGANIZATION (i.e. User Owns Data option)&lt;/P&gt;
&lt;P&gt;2) Make sure to record the Application Secret which is displayed on your screen after the app is registered&lt;/P&gt;
&lt;P&gt;3) When granting permissions in the Azure Portal, be sure to check "Grant Permissions for [Your Organization Name]"&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;2. Extract token using Powershell&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Please follow below video to extract token using Powershell.&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=f7HLyiAk-lQ" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=f7HLyiAk-lQ&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(Credits - Adam(#GuyInACube))&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;- if you're using powershell for the first time, U will need to install Powerbi Module by running below command in Powershell as adminstrator.&lt;/P&gt;
&lt;P&gt;Install-Module -Name MicrosoftPowerBIMgmt&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 03:15:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2503427#M36006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-10T03:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2503951#M36010</link>
      <description>&lt;P&gt;But then I am authenticating with an application right? And like I mentioned:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When authenticating with my service principle, a lot of API calls give me the following response: "Message": "API is not accessible for application".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to be able to authenticate with my personal user account.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The option to retrieve a key using powershell works, but thats via powershell and i would like to do it in postman/ any given API tool without putting powershell in between.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 07:17:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2503951#M36010</guid>
      <dc:creator>Tweeg</dc:creator>
      <dc:date>2022-05-11T07:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2512997#M36088</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/331223"&gt;@Tweeg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please check if it hit any following &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal#considerations-and-limitations" target="_self"&gt;limitation&lt;/A&gt;s of using service principal just as the situation in the below threads:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1652433190429.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/714363i57521E8BC7A501AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1652433190429.png" alt="yingyinr_0-1652433190429.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/Error-while-executing-Get-dataset-call-quot-API-is-not/m-p/906725" target="_self"&gt;&lt;SPAN&gt;Error while executing Get dataset call "API is not accessible for application"&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;I was able to find the reason why. This was because I was trying to work on the data form My Org and this is a limitation in the Service Principal method:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Considerations and limitations&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Service principal only works with&amp;nbsp;&lt;A href="https://urldefense.com/v3/__https:/docs.microsoft.com/en-us/power-bi/service-create-the-new-workspaces__;!!IktuQFw!k8eYjsWCxgUuIlH5np_1qV989m_6Y5Ug8zJrsHewib5gjn4ur-PDqS1YBzpXhQ$" target="_blank" rel="nofollow noopener noreferrer"&gt;new workspaces&lt;/A&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;My Workspace&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;isn't supported when using service principal.&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In addition, please check if you have the similar status with the following threads. If yes, you can refer their solution to fix your problem...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/67259841/powerbi-api-error-updating-dataset-using-service-principal" target="_self"&gt;PowerBI API error updating Dataset using Service Principal&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The URL in the Microsoft API documentation is wrong for service principals.&lt;/P&gt;
&lt;P&gt;You need to also include the workspace ID in the URL, see below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;https://api.powerbi.com/v1.0/myorg/groups/{WorkspaceID}/datasets/{DatasetId}refreshes&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Power-Bi-REST-API-401-Authorization-error-when-using-Service/m-p/627827" target="_self"&gt;Power Bi REST API - 401 Authorization error when using Service Principals&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 09:17:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2512997#M36088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-13T09:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2722208#M38125</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/331223"&gt;@Tweeg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The related team&amp;nbsp;have fixed the Power BI Known issue : &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoftapc.sharepoint.com%2Fteams%2FPowerBISupportabilityBetaTeam%2FLists%2FPBI%2520%2520Current_Known_Issues_%2FDispForm.aspx%3FID%3D169&amp;amp;data=05%7C01%7Cv-yiruan%40microsoft.com%7C31adf90223b241aacaa708da856c5792%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637968997636435458%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=xXVogVpwlzkx1IseU0OipYnwsTj2S0i7xjVq8ruozIk%3D&amp;amp;reserved=0" target="_blank"&gt;&lt;SPAN&gt;"Try it" button is missing on every pages in PBI REST API&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;, please check if it is OK in your side. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 06:40:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authenticate-REST-API/m-p/2722208#M38125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-24T06:40:05Z</dc:date>
    </item>
  </channel>
</rss>

