Forum Discussion
How do I get Power BI REST API data into a Power BI report?
- 1 year ago
1. You have two ways of connecting to power query one is using a Power BI Connector which will be present as a mez file in your local directory but cannot be refreshed in service without a gateway. Refer the below link
Power BI REST API Connector — The Power User
2. The other way is refreshable in service and you will need a service principal with necessary scopes to call the API. Please check the below blog on how to call Power BI Rest APIs within power query using Service Principal
Connect with Power BI to the Power BI REST API with a Service Principal – PBI Guy
Thanks,
Hi jarwest ,
Thanks for posting in Microsoft Fabric Community.
As mentioned by Jai-Rathinavel , the PowerBIRESTAPI.Navigation() function in your report is from a custom connector that uses a .mez file to access the Power BI REST API. This connector isn’t part of the standard Power BI setup, so without the .mez file in the right location, Power BI will throw the error you’re seeing.You can download the .mez file from here:
Custom Connector link
Once downloaded, place the file in the following folder on your machine:
Documents\Power BI Desktop\Custom Connectors
Also, make sure to allow custom connectors in Power BI Desktop under File > Options and Settings > Options > Security > Data Extensions by selecting (Not recommended) Allow any extension to load without validation or warning.
You should be able to see the Power BI API Custom Connector in your Get Data Window:
For more information on how to create your own custom connectors folder, please visit the official documentation from Microsoft Power BI Custom Connectors.
If you prefer not to use the custom connector, the alternative is to use Web.Contents() in Power Query to call the Power BI REST API directly, which is refreshable in the Power BI Service. This method requires setting up a service principal for authentication.
Web.Contents - PowerQuery M | Microsoft Learn
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.
- jarwest1 year agoHelper II
Hello! I accepted a solution on this, sorry for the delay. Jai's solution works great, the only issue I'm running into now is that I can't get the resource to refresh in PBI service. Do I need to install anything onto a gateway or anything?