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
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
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
Top Kudoed Authors