<?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 Unable to connect API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2535457#M36291</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have BMC Remedy API and trying to consume it to show data in dashboard.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am followwing below vedio but no luck as I am not sure from where I can generate Bearer token. Also I am not sure there are different ways to consume on-premise API and cloud APIs .&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=N8qYRSqRz84" target="_self"&gt;https://www.youtube.com/watch?v=N8qYRSqRz84&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to understand how can I consume the api in Power BI.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 08:12:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-24T08:12:18Z</dc:date>
    <item>
      <title>Unable to connect API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2535457#M36291</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have BMC Remedy API and trying to consume it to show data in dashboard.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am followwing below vedio but no luck as I am not sure from where I can generate Bearer token. Also I am not sure there are different ways to consume on-premise API and cloud APIs .&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=N8qYRSqRz84" target="_self"&gt;https://www.youtube.com/watch?v=N8qYRSqRz84&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to understand how can I consume the api in Power BI.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 08:12:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2535457#M36291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-24T08:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2543097#M36374</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, we need to get Access token in Power BI Desktop. We will get access token from Power BI by below code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;() =&amp;gt;

 

let

    body = "client_id=" &amp;amp; #"App ID"

    &amp;amp; "&amp;amp;scope=https://analysis.windows.net/powerbi/api/.default&amp;amp;client_secret=" &amp;amp; #"App Secret"

    &amp;amp; "&amp;amp;grant_type=client_credentials",

    Data= Json.Document(Web.Contents("https://login.microsoftonline.com/"&amp;amp; TenantID &amp;amp; "/oauth2/v2.0/token/",

    [Headers=[#"Content-Type"="application/x-www-form-urlencoded"], Content=Text.ToBinary(body)])),

    access_token = Data[access_token]

in

    access_token&lt;/LI-CODE&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;() =&amp;gt;

 

let

    body =  "&amp;amp;grant_type=Password&amp;amp;resource = https://analysis.windows.net/powerbi/api

&amp;amp;client_id=*****&amp;amp;username=*****&amp;amp;password=*****",

    
 Data=Json.Document(Web.Contents("https://login.microsoftonline.com/common/oauth2/v2.0/token/",

    [Headers=[#"Content-Type"="application/x-www-form-urlencoded"], Content=Text.ToBinary(body)])),

    access_token = Data[access_token]

in

    access_token&lt;/LI-CODE&gt;
&lt;P&gt;Then you can follow your &lt;A href="https://www.youtube.com/watch?v=N8qYRSqRz84%20," target="_self"&gt;video&lt;/A&gt; above to get data from the Rest API by access token in first step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Finally, you can replace bear token by the access token parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It will refresh every time your refresh your report.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Video: How to get access token and call Rest API by dynamic access token in Power BI Desktop? (5:30 to 9:30)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P lang="en-US"&gt;&lt;SPAN&gt;&lt;A tabindex="-1" title="https://www.youtube.com/watch?v=n8qyrsqrz84" href="https://www.youtube.com/watch?v=N8qYRSqRz84" target="_blank" rel="noopener noreferrer nofollow" aria-label="Link https://www.youtube.com/watch?v=N8qYRSqRz84"&gt;all Power BI Rest API with Dynamic Access Token From Power BI Desktop |Power BI Rest API&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>Fri, 27 May 2022 07:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2543097#M36374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-27T07:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2543965#M36383</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I am new to Power BI . Can you please let me know where I need to put the code you have mentioned in Power BI to generate access token .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 13:30:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2543965#M36383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-27T13:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2546307#M36392</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on "Transform data"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;-&amp;gt; Right Click in Queries -&amp;gt; Select "Blank Query" in New Query&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;-&amp;gt;Click on Advanced Editor&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;-&amp;gt; Copy and paste your code into Advanced Editor. Note: You need to replace parameters like "Client_ID" by correct ID.&lt;/P&gt;
&lt;P&gt;&lt;img /&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>Mon, 30 May 2022 01:51:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-connect-API/m-p/2546307#M36392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-30T01:51:03Z</dc:date>
    </item>
  </channel>
</rss>

