EPC Group - Enterprise Microsoft AI, SharePoint, Power BI, and Azure Consulting
G2 High Performer Summer 2025, Momentum Leader Spring 2025, Leader Winter 2025, Leader Spring 2026
BlogContact
Ready to transform your Microsoft environment?Get started today
(888) 381-9725Get Free Consultation
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌

EPC Group

Enterprise Microsoft consulting with 29 years serving Fortune 500 companies.

(888) 381-9725
contact@epcgroup.net
4900 Woodway Drive - Suite 830
Houston, TX 77056

Follow Us

Solutions

  • All Services
  • Microsoft 365 Consulting
  • AI Governance
  • Azure AI Consulting
  • Cloud Migration
  • Microsoft Copilot
  • Data Governance
  • Microsoft Fabric
  • vCIO / vCAIO Services
  • Large-Scale Migrations
  • SharePoint Development

Industries

  • All Industries
  • Healthcare IT
  • Financial Services
  • Government
  • Education
  • Teams vs Slack

Power BI

  • Case Studies
  • 24/7 Emergency Support
  • Dashboard Guide
  • Gateway Setup
  • Premium Features
  • Lookup Functions
  • Power Pivot vs BI
  • Treemaps Guide
  • Dataverse
  • Power BI Consulting

Company

  • About Us
  • Our History
  • Microsoft Gold Partner
  • Case Studies
  • Testimonials
  • Blog
  • Resources
  • All Guides & Articles
  • Video Library
  • Client Reviews
  • Contact
  • Schedule a consultation

Microsoft Teams

  • Teams Questions
  • Teams Healthcare
  • Task Management
  • PSTN Calling
  • Enable Dial Pad

Azure & SharePoint

  • Azure Databricks
  • Azure DevOps
  • Azure Synapse
  • SharePoint MySites
  • SharePoint ECM
  • SharePoint vs M-Files

Comparisons

  • M365 vs Google
  • Databricks vs Dataproc
  • Dynamics vs SAP
  • Intune vs SCCM
  • Power BI vs MicroStrategy

Legal

  • Sitemap
  • Privacy Policy
  • Terms
  • Cookies

About EPC Group

EPC Group is a Microsoft consulting firm founded in 1997 (originally Enterprise Project Consulting, renamed EPC Group in 2005). 29 years of enterprise Microsoft consulting experience. Microsoft Gold Partner from 2003–2022 — the oldest Microsoft Gold Partner in North America — and currently a Microsoft Solutions Partner with six designations: Data & AI, Modern Work, Infrastructure, Security, Digital & App Innovation, and Business Applications.

Headquartered at 4900 Woodway Drive, Suite 830, Houston, TX 77056. Public clients include NASA, FBI, Federal Reserve, Pentagon, United Airlines, PepsiCo, Nike, and Northrop Grumman. 6,500+ SharePoint implementations, 1,500+ Power BI deployments, 500+ Microsoft Fabric implementations, 70+ Fortune 500 organizations served, 11,000+ enterprise engagements, 200+ Microsoft Power BI and Microsoft 365 consultants on staff.

About Errin O'Connor

Errin O'Connor is the Founder, CEO, and Chief AI Architect of EPC Group. Microsoft MVP for multiple years starting 2002–2003. 4× Microsoft Press bestselling author of Windows SharePoint Services 3.0 Inside Out (MS Press 2007), Microsoft SharePoint Foundation 2010 Inside Out (MS Press 2011), SharePoint 2013 Field Guide (Sams/Pearson 2014), and Microsoft Power BI Dashboards Step by Step (MS Press 2018).

Original SharePoint Beta Team member (Project Tahoe). Original Power BI Beta Team member (Project Crescent). FedRAMP framework contributor. Worked with U.S. CIO Vivek Kundra on the Obama administration's 25-Point Plan to reform federal IT, and with NASA CIO Chris Kemp as Lead Architect on the NASA Nebula Cloud project. Speaker at Microsoft Ignite, SharePoint Conference, KMWorld, and DATAVERSITY.

© 2026 EPC Group. All rights reserved. Microsoft, SharePoint, Power BI, Azure, Microsoft 365, Microsoft Copilot, Microsoft Fabric, and Microsoft Dynamics 365 are trademarks of the Microsoft group of companies.

Back to Blog

How to Get Data from a Power BI Dataset via an API

Errin O\'Connor
December 2025
8 min read

Accessing data from Power BI datasets programmatically via the REST API enables organizations to integrate BI data into custom applications, automate reporting workflows, and build data pipelines that extend Power BI's native capabilities. At EPC Group, we have built hundreds of API-driven integrations for enterprise clients who need to extract, transform, and consume Power BI data outside the standard Power BI Service interface.

Understanding the Power BI REST API

The Power BI REST API is a comprehensive set of endpoints that allow developers to interact programmatically with Power BI resources including datasets, reports, dashboards, workspaces, and more. For data extraction specifically, the most important endpoint is the Execute Queries API, which enables you to run DAX queries against a published dataset and receive results in JSON format.

The API is organized around Azure Active Directory (now Microsoft Entra ID) authentication, meaning all requests must include a valid OAuth 2.0 bearer token. This ensures enterprise-grade security and enables fine-grained access control through Azure AD app registrations, service principals, and row-level security (RLS) enforcement even at the API level.

Before diving into implementation, it is important to understand that the Power BI API is not designed as a high-volume data extraction tool. It is optimized for moderate query loads and interactive scenarios. For bulk data extraction, consider using Azure Synapse Link, XMLA endpoints, or exporting to Azure Data Lake Storage. Our consultants help organizations choose the right approach based on their data volume, latency requirements, and architecture.

Authentication: Setting Up Azure AD App Registration

The first step in accessing Power BI data via the API is setting up authentication through Microsoft Entra ID (Azure AD). You need to register an application in Azure AD and grant it the appropriate Power BI API permissions. There are two primary authentication approaches:

  • Service Principal authentication - Recommended for production applications and automated pipelines. Create an Azure AD app registration, generate a client secret or certificate, and assign the service principal to Power BI workspaces. This approach does not require a user context and supports unattended execution.
  • Delegated (user) authentication - Used when the API call should execute in the context of a specific user, inheriting their permissions and RLS assignments. This approach requires interactive login or a stored refresh token and is typically used in custom web applications where users authenticate individually.

For service principal authentication, you must enable service principal access in the Power BI admin portal under Tenant Settings. Navigate to Developer Settings and enable "Allow service principals to use Power BI APIs." You can scope this to specific security groups for tighter control. The service principal must also be added as a member or admin of the target workspace.

The required API permissions include Dataset.Read.All for reading dataset data and Dataset.ReadWrite.All if you also need to push data or modify datasets. For the Execute Queries endpoint specifically, your service principal or user must have Build permission on the target dataset.

Executing DAX Queries via the API

The Execute Queries endpoint (POST /datasets/{datasetId}/executeQueries) accepts a DAX query and returns the results as a JSON table. This is the primary method for extracting data from a published Power BI dataset. The request body contains the DAX query wrapped in a JSON structure:

{
  "queries": [
    {
      "query": "EVALUATE TOPN(100, 'Sales', 'Sales'[Revenue], DESC)"
    }
  ],
  "serializerSettings": {
    "includeNulls": true
  }
}

The DAX query must use the EVALUATE statement, which returns a table result. You can use any valid DAX table expression including SUMMARIZECOLUMNS, CALCULATETABLE, FILTER, TOPN, and ADDCOLUMNS. This gives you tremendous flexibility to shape the data exactly as your application needs it, applying filters, aggregations, and calculations server-side.

Key limitations to be aware of: the API enforces a maximum of 100,000 rows per query result, a 120-second query timeout, and a limit of one query per request (though you can batch multiple EVALUATE statements). For datasets larger than these limits, implement pagination using TOPN with offset patterns or use the XMLA endpoint instead.

The response includes metadata about each column (name and data type) and the row data in a structured array. Parse this JSON response in your application to populate data grids, feed dashboards, trigger automated alerts, or load data into downstream systems.

XMLA Endpoints for Advanced Data Access

For organizations with Power BI Premium or Premium Per User (PPU) licensing, XMLA endpoints provide a more powerful and familiar way to access dataset data. XMLA (XML for Analysis) is the same protocol used by SQL Server Analysis Services (SSAS), which means existing tools and libraries that connect to SSAS can connect directly to Power BI datasets.

XMLA endpoints support both read and read/write operations. With read access, you can use tools like SQL Server Management Studio (SSMS), Azure Data Studio, or any OLEDB/ADOMD.NET client library to query Power BI datasets using DAX or MDX. With read/write access, you can also process tables, manage partitions, and perform administrative operations programmatically.

The XMLA connection string follows the format: powerbi://api.powerbi.com/v1.0/myorg/WorkspaceName. This makes Power BI datasets accessible from virtually any analytics tool that supports Analysis Services connections, including Python (using the pyadomd library), R, and custom .NET applications.

Practical Implementation Patterns

At EPC Group, we see several common patterns for API-based data access from Power BI datasets:

  • Custom application dashboards - Embedding specific KPIs from Power BI datasets into line-of-business applications, CRM systems, or internal portals using the Execute Queries API to fetch real-time metrics.
  • Automated alerting and monitoring - Azure Functions or Logic Apps that periodically query Power BI datasets to check threshold conditions and trigger email, Teams, or SMS notifications when business rules are violated.
  • Data export pipelines - Scheduled processes that extract data from Power BI datasets and load it into other systems such as data warehouses, reporting databases, or third-party analytics platforms.
  • Self-service data portals - Custom web applications that allow business users to select parameters and receive formatted data exports (Excel, CSV, PDF) generated from Power BI dataset queries.
  • Mobile and IoT integrations - Lightweight API calls from mobile apps or IoT dashboards that fetch aggregated metrics from centrally governed Power BI datasets rather than querying raw data sources directly.

Each pattern requires careful consideration of authentication, caching, rate limiting, and error handling. Our consultants design these integrations with production-grade reliability, implementing retry logic with exponential backoff, token caching to minimize authentication overhead, and proper error handling for API throttling (HTTP 429) responses.

Why Choose EPC Group for Power BI API Integration

With 29 years of enterprise Microsoft consulting experience, EPC Group brings deep expertise in Power BI architecture, Azure AD integration, and custom application development. Our team has built API integrations for Fortune 500 companies, healthcare systems requiring HIPAA-compliant data handling, and financial institutions operating under SOC 2 controls.

We do not just connect to APIs. We architect solutions that are secure, scalable, and maintainable. This includes implementing service principal governance, building monitoring dashboards for API usage and performance, and designing fallback strategies for when the API is unavailable. As a former Microsoft Gold Partner (2003–2022, the oldest in North America) and current Microsoft Solutions Partner, we have direct access to Microsoft engineering resources when complex issues arise.

Need Power BI API Integration?

Contact EPC Group to discuss your Power BI API integration requirements. Whether you need to extract data for custom applications, build automated workflows, or connect Power BI to third-party platforms, our enterprise consultants deliver production-ready solutions.

Schedule a ConsultationCall (888) 381-9725

Frequently Asked Questions

Do I need Power BI Premium to use the REST API?

No. The Execute Queries endpoint works with both Power BI Pro and Premium datasets. However, XMLA endpoint access requires Premium or Premium Per User licensing. The REST API also has more restrictive rate limits for Pro workspaces compared to Premium capacity. For high-volume API usage, Premium is recommended.

What programming languages can I use to call the Power BI API?

Any language that can make HTTP requests works with the Power BI REST API. Common choices include Python (using the requests library or the azure-identity library for authentication), C# (.NET), JavaScript/TypeScript (Node.js), and PowerShell. Microsoft provides official client libraries for .NET and Python. EPC Group typically implements production integrations in Python or C# depending on the client's technology stack.

Is there a row limit when querying data via the API?

Yes. The Execute Queries endpoint returns a maximum of 100,000 rows per query. If your query would return more rows, implement pagination using DAX functions like TOPN with an offset pattern, or use the XMLA endpoint which supports larger result sets. For bulk data export scenarios, consider using Power BI's export to Azure Data Lake Storage feature instead of the API.

How does row-level security work with the API?

When using delegated (user) authentication, the API automatically enforces RLS rules defined in the dataset based on the authenticated user's identity. With service principal authentication, RLS is not automatically applied because the service principal is not a "user" with an assigned role. You can use the EffectiveIdentity parameter in the API request to impersonate a specific user and enforce their RLS role. This is essential for multi-tenant applications that serve different users with different data access levels.

Can I write data back to a Power BI dataset via the API?

The Power BI REST API supports push datasets and streaming datasets, which allow you to push rows of data into Power BI for real-time dashboards. However, you cannot write back to import-mode datasets or modify existing data in a standard dataset. For read/write scenarios, the XMLA endpoint (Premium only) supports processing operations. If your use case requires true write-back, consider using Power Apps or a custom application that writes to the underlying data source, which Power BI then reads.

Why Organizations Choose EPC Group

EPC Group is a Houston-based Microsoft consulting firm with 29 years of enterprise implementation experience and over 10,000 successful deployments across Power BI, Microsoft Fabric, SharePoint, Azure, Microsoft 365, and Copilot. We serve organizations across all industries including Fortune 500, federal agencies, healthcare, financial services, government, manufacturing, energy, education, retail, technology, and global enterprises.

What sets EPC Group apart is our governance-first approach. Every engagement begins with a security and compliance assessment. Our team of senior architects brings hands-on delivery experience across HIPAA, SOC 2, FedRAMP, and CMMC environments. We own outcomes, not hours.

  • Fixed-fee accelerators with predictable pricing and defined deliverables
  • Senior architect engagement on every project, not rotating juniors
  • Compliance-native delivery for regulated industries
  • End-to-end coverage from strategy through 24/7 managed services
  • 11,000+ enterprise engagements refined into repeatable, risk-controlled patterns

Call (888) 381-9725 or email contact@epcgroup.net for a free assessment.

Power BI Strategy: 2026 Considerations for How To Get Data From Power BI Dataset Via An Api

Power BI capacity sizing in 2026 starts with the F-SKU economics: F2 ($263/mo) covers small workloads with up to 4 GB of memory and roughly 30 reports, F4 ($526/mo) handles a typical mid-market deployment with semantic-model refresh windows under 10 minutes, and F64 ($5,257/mo) is the sweet spot for enterprises consuming Power BI alongside Microsoft Fabric data engineering, lakehouse storage, and real-time intelligence. Capacity right-sizing should be revisited every 90 days because Microsoft adjusts F-SKU memory allocations, paginated report performance, and Direct Lake mode availability with each major service update.

Direct Lake mode has changed the economics of enterprise Power BI in 2026: instead of importing data into Vertipaq, semantic models now query OneLake-resident Parquet files at near-Import-mode performance without the refresh-window cost. For a Fortune 500 finance organization migrating from a 30-minute Import-mode refresh, the equivalent Direct Lake model typically queries fact data in under 800 ms while removing the entire refresh-orchestration job from Azure Data Factory.

Decision factors EPC Group evaluates

  • Capacity sizing decision (F2/F4/F64+) tied to peak concurrent users and refresh window
  • Copilot grounding quality assessment of semantic-model metadata
  • Direct Lake mode adoption for Fabric-resident semantic models
  • License optimization audit (Pro vs Premium Per User vs F-SKU)
  • Row-level security via service principal authentication

See related EPC Group services at /services or schedule a discovery call at /contact.