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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
adelmonte
Resolver I
Resolver I

REST API get dataset data - Datasets - Execute Queries

Hi All,

I need to get data from a dataset online.
How can I use REST API to show data online?

Thanks,

Alex

2 ACCEPTED SOLUTIONS

Well, you can allow Service Principals to use Power Bi Rest API on your PowerBI Admin Portal tenant settings. Then register the app, get the secret, add permissions, add the Service Principal to the workspace. After that you can share a Service Principal to external users. They should be able to use the Rest API and excecute queries

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

6 REPLIES 6
ibarrau
Super User
Super User

Hi. How do you want to connect? I mean, you can open Power Bi Desktop and get data from PowerBi Datasets to build new reports from a current dataset. The admin must have the connection across datasets turned on.

If you just want to use a language code to get specific thing from a dataset, you can use the rest api. It would be this request:
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries-in-group

If you find hard to use the API you can use libraries depending on the language. For example you can import SimplePBI for python or use cmdlets for power bi on PowerShell.

Be sure to read the Considerations and Limitations on the link above.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hi @ibarrau,
Thanks for your reply.

Yes, I would like to use a language code to get specific thing from a dataset.
Is there any example on how it is done?
Youtube video or a tutorial online?

Thanks,

Alex

Hi. There might be many videos with PowerShell beacuse it's kind of the language Microsoft users for scripting. But I'm sure that if you google X language + power bi rest api you might find something. You need an understanding of APIs in a language first.

You can also check the documentation: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasets-in-group

Custom libraries built by people also have some details on how to use them. SimplePBI for example has definitions on the repo:
https://github.com/ladataweb/SimplePBI

I hope something like this helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hi @ibarrau 
Many thanks for your reply!
I would need to allow to external consultant access to my dataset
so that they can reach it externally using REST API.

How should I proceed to give them access to my Dataset.

Regards,
Alex

Well, you can allow Service Principals to use Power Bi Rest API on your PowerBI Admin Portal tenant settings. Then register the app, get the secret, add permissions, add the Service Principal to the workspace. After that you can share a Service Principal to external users. They should be able to use the Rest API and excecute queries

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Thanks @ibarrau 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors