Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amsrivas
Helper IV
Helper IV

Power BI calls REST API.

Hi Folks!!

 

Will it be possible to call Power BI Rest API from either from Power BI Desktop or Power BI Services.

 

I.e.can we call below REST API from Power BI Desktop or Power BI Services.

 

Command : 

$url="https://api.powerbi.com/v1.0/myorg/groups"

Invoke-PowerBIRestMethod -Url $url -Method Get

 

Thanks

Amit Srivastava

 

 

Thanks

Amit Srivastava

7 REPLIES 7
v-yingjl
Community Support
Community Support

Hi @amsrivas ,

You can use Web connector to connect to Rest API in power bi desktop.

web.png

 

Here is the a viedo and a document that introduce it in details:

  1. Power BI Tutorial: Power BI REST API no-code options. Import Rest API into Power BI 
  2. Display a time series using the Metrics API 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yingjl 

I want to call below REST API from PowerShell

 

$url="https://api.powerbi.com/v1.0/myorg/groups"

Invoke-PowerBIRestMethod -Url $url -Method Get

 

When I putting https://api.powerbi.com/v1.0/myorg/groups on Web Connector, it sat "Access prohibited" but wondering as i can excute this command from PowerShell and able to fetch data.

 

Could you please suggest why i am getting access related issue while connecting from PowerBI.

 

Thanks

Amit

Hi @amsrivas ,

Based on my test, this api will return the specific power bi account workspace information as json format in Powershell if you have connecting to your power bi account by "Connect-PowerBIServiceAccount"

p1.png

We can run this Powershell script to export it as a .csv file:

p2.png

It will create a .csv file at your specified path which includes the above information:

re1.png

 

If you cannot use "Connect-PowerBIServiceAccount" command in powershell, run Powershell as administrator and run this command: "Install-Module -Name MicrosoftPowerBIMgmt"

 

After getting the .csv file, we can connect it in power bi desktop and power bi service to transform data as your needed.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yingjl ,

Can understand, this can be achieved via steps you have mentioned however issue in this process is i am not able to automatized the process.

 

I can say, it can automatised via TASK SCHEDULAR or AZURE FUNCTION, but unfortunately, i dont have priviledge to use either of the option.

 

Is there any other way to automatised this process.

 

Thanks

Amit 

Hi @amsrivas ,

As far as I know, if you dont have priviledge to use TASK SCHEDULAR or AZURE FUNCTION, PowerShell is a better way to achieve this while it could not be automatically.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Hi @amitchandak 

 

We do not have priviledge to use AZURE as we do not have Azure account/subscription with us.

 

Is there any other way via which we can achieve the requirement without having need of Azure.

 

Please suggest!!

 

Thanks

Amit

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors