ml-connector
QuickBooks OnlineMicrosoft Power BI

QuickBooks Online and Microsoft Power BI integration

QuickBooks Online is where you track invoices, bills, expenses, and payroll. Microsoft Power BI is where you visualize that data and share insights. Connecting the two keeps your operational and financial dashboards in sync without manual exports or re-keying. Vendors, customers, accounts, bills, invoices, and journal entries flow into Power BI datasets automatically, so your reports reflect the current state of your QuickBooks Online books.

How QuickBooks Online works

QuickBooks Online exposes vendors, customers, employees, items, accounts, departments, classes, bills, invoices, purchase orders, payments, and journal entries through the QuickBooks Online Accounting API v3 REST endpoint at https://quickbooks.api.intuit.com/v3/company/{realmId}. Authentication uses OAuth 2.0 Authorization Code flow with a 1-hour access token and rotating refresh tokens. QuickBooks Online offers both webhooks (Create/Update/Delete events on 25+ entity types) and Change Data Capture (CDC) polling at the /cdc endpoint with 30-day history. Webhook payloads contain only entity ID and operation, so the full record must be fetched via GET. All updates require exact object representation and a SyncToken for concurrency control.

How Microsoft Power BI works

Microsoft Power BI accepts data through REST APIs that push rows into push datasets and trigger dataset refreshes. Authentication uses OAuth 2.0 Client Credentials with a service principal authenticated against Azure AD at https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token. The service principal must be added as Member or Admin to each Power BI workspace. Push datasets require table schema definition (column names and data types) before posting rows. Power BI does not push events outbound, so the integration polls QuickBooks Online and pushes data into Power BI; it does not receive webhook notifications from Power BI. Tokens expire after approximately 1 hour and must be refreshed.

What moves between them

The integration runs from QuickBooks Online into Microsoft Power BI. ml-connector polls vendors, customers, accounts, bills, invoices, and journal entries from QuickBooks Online on a schedule you define, maps each record to your Power BI dataset schema, and posts the rows into your push datasets. Reference data such as accounts, classes, and departments flows in both directions so your dimensions stay aligned and reports can slice by valid QuickBooks Online categories. Updates and deletes are tracked through QuickBooks Online webhooks or CDC polling, and each change is re-pushed to Power BI to keep dashboards current. Power BI is read-only from ml-connector's perspective - no data flows back to QuickBooks Online.

How ml-connector handles it

ml-connector stores your QuickBooks Online OAuth2 credentials encrypted and manages token rotation automatically, refreshing the access token when calls return a 401. It also handles QuickBooks Online's 1-hour token lifetime and the complex refresh token rotation (every 24-26 hours) by re-requesting credentials at the OAuth token endpoint. ml-connector accepts webhook events from QuickBooks Online (which fire on Create/Update/Delete for 25+ entity types) but deduplicates them because webhook payloads can arrive out-of-order or duplicated and contain only entity ID - ml-connector fetches the full record on each event. Alternatively, it can poll the Change Data Capture endpoint with 30-day history for entities not covered by webhooks. On the Power BI side, ml-connector presents the service principal client credentials as a Bearer token on every API call, and it manages Power BI token expiry by re-authenticating every 55 minutes to stay ahead of the 1-hour window. ml-connector validates that all QuickBooks Online records conform to the table schema defined in your Power BI dataset before pushing, and it tracks every record with an audit trail so failed pushes can be replayed. All QuickBooks Online updates require the SyncToken from the previous fetch to avoid concurrency conflicts, so ml-connector caches the latest token per record.

A real-world example

A mid-sized professional services firm runs QuickBooks Online for accounting and has Power BI dashboards for revenue recognition, cash flow forecasting, and vendor spend analysis. Before integration, the accounting team exported vendor invoices and bills from QuickBooks Online weekly, re-entered them into a manual data model, and refreshed their Power BI reports by hand. Dashboard accuracy drifted between exports, and the re-entry process introduced keying errors. With QuickBooks Online and Power BI connected, each bill or invoice posted in QuickBooks Online flows automatically into the Power BI dataset within minutes, and the revenue and expense dashboards refresh on schedule without manual intervention. Month-end reporting starts with current data, and the accounting team can focus on analysis rather than data movement.

What you can do

  • Poll vendors, customers, accounts, bills, invoices, and journal entries from QuickBooks Online on a schedule you define.
  • Push financial records into Microsoft Power BI push datasets with the correct table schema and column mappings.
  • Handle QuickBooks Online's OAuth2 token rotation (1-hour access tokens and 24-26 hour refresh token lifecycle) automatically.
  • Receive and deduplicate QuickBooks Online webhook events or poll the Change Data Capture endpoint for 30-day history.
  • Track every record with a full audit trail and replay failed pushes to Power BI without re-querying QuickBooks Online.

Questions

How does the integration handle QuickBooks Online's OAuth2 token lifecycle?
QuickBooks Online access tokens expire in 1 hour, and refresh tokens rotate every 24-26 hours. ml-connector caches the encrypted OAuth2 credentials and automatically refreshes the access token when a call returns 401. It also proactively re-authenticates every 55 minutes to stay ahead of the 1-hour expiry window and avoids a stale token that would force a full re-auth.
Why does ml-connector fetch full records even though QuickBooks Online webhooks fire on every change?
QuickBooks Online webhook payloads contain only the entity ID, name, and operation type - not the full record. ml-connector must fetch each changed record via GET to capture all fields. Webhooks can also arrive out-of-order or duplicated, so ml-connector deduplicates by checking if the record was already fetched in the same batch.
Does the integration work if I disable webhooks and use polling instead?
Yes. ml-connector can poll the QuickBooks Online Change Data Capture (CDC) endpoint at /cdc, which returns a 30-day change history with both creates and updates. Polling is more reliable than webhooks for detecting changes but has higher latency. ml-connector can also combine both: receive webhooks for speed but fall back to CDC polling for any misses.

Related integrations

Connect QuickBooks Online and Microsoft Power BI

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started