<?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: Call Power BI API in Power Query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Call-Power-BI-API-in-Power-Query/m-p/1873603#M40191</link>
    <description>&lt;P&gt;Yep.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/migueesc123/PowerBIRESTAPI" target="_blank"&gt;migueesc123/PowerBIRESTAPI: A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API (github.com)&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 31 May 2021 20:31:28 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-05-31T20:31:28Z</dc:date>
    <item>
      <title>Call Power BI API in Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Call-Power-BI-API-in-Power-Query/m-p/1870683#M40104</link>
      <description>&lt;P&gt;I'm trying to retrieve data from Power BI API services and the same is being accomplished via PowerShell code. But unfortunately due to some circumstances I am not able to deploy it in production. Hence now I am trying to get the same thing done in Power BI desktop itself so that I can call power BI rest API from Power Query only. There are tons of blogpost about calling an API in power query but they all require Power BI App registered Client ID. Which I don't have. I'm successfully able to call with my user name password in PowerShell and even I'm getting response from API.&lt;/P&gt;&lt;P&gt;Please find below PowerShell code and let me know if we can replicate the same in Power Query.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# User credential
$User = 'shahab***@*****.com'
$Pword = ConvertTo-SecureString –String '***password***' –AsPlainText -Force

$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User,$Pword

# Connect to service
Login-PowerBIServiceAccount -Credential $Credential  

#Get Bearer token
$headers = Get-PowerBIAccessToken  

$uri = 'https://api.powerbi.com/v1.0/myorg/datasets/f52f2abc-6445-41ee-ce02-3908c6e18dd4/refreshes' 
$refreshes = Invoke-RestMethod -Uri $uri -Headers $headers -Method GET
$xs= $refreshes&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 May 2021 20:36:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Call-Power-BI-API-in-Power-Query/m-p/1870683#M40104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-28T20:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Call Power BI API in Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Call-Power-BI-API-in-Power-Query/m-p/1873603#M40191</link>
      <description>&lt;P&gt;Yep.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/migueesc123/PowerBIRESTAPI" target="_blank"&gt;migueesc123/PowerBIRESTAPI: A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 20:31:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Call-Power-BI-API-in-Power-Query/m-p/1873603#M40191</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-05-31T20:31:28Z</dc:date>
    </item>
  </channel>
</rss>

