<?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: REST API call from Power Automate in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2262619#M33697</link>
    <description>&lt;P&gt;1. Write your own custom connector. Swagger file examples can be found on the interwebs&lt;/P&gt;
&lt;P&gt;2. Power Automate has a ready-made action to request the refresh of a Power BI dataset.&amp;nbsp; That could take care of your second request.&lt;/P&gt;</description>
    <pubDate>Sun, 02 Jan 2022 01:50:09 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-01-02T01:50:09Z</dc:date>
    <item>
      <title>REST API call from Power Automate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2262211#M33693</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run the following API calls in Power Automate to get the history, and refresh the datasets:&lt;/P&gt;&lt;P&gt;GET&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;POST &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can run a single call of POST, I get a status code of 202,&amp;nbsp; but if I try to run the same call in a loop I get a 401. The call is exactly the same other than there is a loop and the API is called multiple times.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You have to first get a token for the authorization, I have tried both a single call before the loop and within the loop, still the same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any ideas please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 16:48:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2262211#M33693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-31T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: REST API call from Power Automate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2262619#M33697</link>
      <description>&lt;P&gt;1. Write your own custom connector. Swagger file examples can be found on the interwebs&lt;/P&gt;
&lt;P&gt;2. Power Automate has a ready-made action to request the refresh of a Power BI dataset.&amp;nbsp; That could take care of your second request.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 01:50:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2262619#M33697</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-01-02T01:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: REST API call from Power Automate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2264671#M33723</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to these blogs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Custom-Connector-in-Power-Automate-Microsoft-Flow-for-Power-BI/ba-p/1224350" target="_self"&gt;https://community.powerbi.com/t5/Community-Blog/Custom-Connector-in-Power-Automate-Microsoft-Flow-for-Power-BI/ba-p/1224350&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://data-marc.com/2020/01/13/manage-all-your-power-bi-refreshes-in-one-place-with-power-automate-flow/" target="_self"&gt;https://data-marc.com/2020/01/13/manage-all-your-power-bi-refreshes-in-one-place-with-power-automate-flow/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition, you should also note that the pro license can be refreshed 8 times a day and the &lt;SPAN&gt;Premium&amp;nbsp;&lt;/SPAN&gt;capacity can be refreshed 48 times a day.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&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, 04 Jan 2022 03:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2264671#M33723</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2022-01-04T03:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: REST API call from Power Automate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2265388#M33737</link>
      <description>&lt;P&gt;Grrrr, I am so annoyed, but also very happy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found my error. Its not because of the loop, that was a red herring! What it was and the reason why it's so annoying is, as part of the http REST API call is your header. This has your autorization, to the left you have Bearer and your access_token which you have picked up already. The trick is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MAKE SURE YOU HAVE A SPACE AFTER 'Bearer'&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 11:31:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-call-from-Power-Automate/m-p/2265388#M33737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T11:31:11Z</dc:date>
    </item>
  </channel>
</rss>

