Forum Discussion

GGuenther's avatar
GGuenther
New Member
1 year ago
Solved

Power BI Rest API getting table Data

Hi everyone, I'm currently working on a web application and I would like to access data from tables that were created in Power BI Desktop. These tables are part of a dataset that was published to th...
  • v-hashadapu's avatar
    1 year ago

    Hi GGuenther , Thank you for reaching out to the Microsoft Community Forum.

     

    Yes, it is possible to access data from a dataset that was created in Power BI Desktop and published to the Power BI Service. Once published, the dataset becomes a semantic model that can be queried programmatically using supported Power BI APIs.

     

    The best and most straightforward approach is to use the Power BI REST API’s Execute Queries endpoint. This allows you to send DAX queries to the dataset and receive results in JSON format, which is ideal for consumption in a JavaScript or Vue web application. You should not use DirectQuery for this purpose, as it's a report-level connection mode, not a data access method. The XMLA endpoint is another option but requires Premium or Premium Per User (PPU) licensing and is typically more complex to implement, so it's not recommended for lightweight web applications.

     

    In terms of licensing, to use the Execute Queries API, you'll need a Power BI Pro license at minimum. If you're using a service principal for authentication, you must enable the appropriate tenant settings in the Power BI admin portal and assign Dataset.Read.All or Dataset.ReadWrite.All permissions to your Azure AD app. Note that datasets with Row-Level Security (RLS) or Single Sign-On (SSO) do not support service principal access. Additionally, API limits include a maximum of 100,000 rows or 1,000,000 values, and a 15MB maximum response size per query. There are also rate limits, typically 120 queries per minute per user or service principal.

     

    If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.