skip to content

When does a Power BI scheduled refresh require an on-premises data gateway?

level: middleimportance: must knowfreq 72%

answer

  1. the refresh job does not run on your machine
  2. ask what the cloud can actually reach
  3. 'cloud source' and 'reachable source' differ
  4. one install mode cannot do DirectQuery at all
  5. the connection is opened outbound, not inbound

basics

~20 s

A gateway is needed whenever the Power BI Service cannot reach the source directly — anything on-premises or inside a private network. Cloud sources reachable over the public internet refresh without one. DirectQuery and live connections to on-prem sources need the standard gateway.

solid answer

~50 s

The Power BI Service runs in Microsoft's cloud, so it can refresh directly from sources it can reach over the public internet — SharePoint Online, Azure SQL with a public endpoint, Dataverse, most SaaS connectors. For anything behind a firewall — a SQL Server in a datacentre, a file share, an SAP system, or a cloud database exposed only through a private endpoint — you install an **on-premises data gateway**, which makes an outbound connection to the Service and relays queries in. There are two modes. **Standard mode** is the production one: installed on a server, shared across users and workspaces, supports import refresh *and* DirectQuery/live connections, and can be clustered for availability. **Personal mode** runs under one user's account, supports import refresh only, and dies when that machine is off — fine for a prototype, not for anything anyone depends on.

code

text · 7 lines
text
SQL Server in company datacentre        -> gateway (standard)
Excel file on a network share / laptop  -> gateway (standard)
SAP / Oracle on-premises                -> gateway (standard)
Azure SQL, public endpoint enabled      -> no gateway
Azure SQL, private endpoint only        -> gateway (standard or VNet)
SharePoint Online / OneDrive for Business -> no gateway
DirectQuery over on-prem SQL Server     -> gateway at every query, not just refresh

go deeper

for a junior

Be ready to say what the gateway is for in one line: the Power BI Service runs in the cloud and cannot reach data inside your network without it.

for a middle

Explain the standard-versus-personal split, the import-only limit of personal mode, and why a private-endpoint cloud database still needs a gateway.

for a senior

Show operational judgment: clustering, placement near the source, sizing for DirectQuery concurrency, service accounts instead of personal credentials, and monitoring refresh failures.

for a principal

Own who runs gateways at all — a central managed cluster versus per-team installs — and the tradeoff against moving sources to cloud endpoints so the gateway disappears from the critical path.

## Why a gateway exists at all The Power BI Service is a multi-tenant cloud service. When a scheduled refresh fires, the refresh job runs in Microsoft's datacentre and has to reach your data from there. If the source has a public endpoint the Service can call — SharePoint Online, OneDrive for Business, Dataverse, Azure SQL Database or Synapse with public network access, Snowflake, most SaaS connectors — no extra component is needed; the Service connects directly using the credentials stored on the semantic model. If the source lives inside your network, there is no route. Opening an inbound firewall hole to a cloud service is not acceptable, so Microsoft's answer is the **on-premises data gateway**: software you install on a machine *inside* the network, which opens an **outbound** connection to the Service (Azure Service Bus / Relay) and holds it open. Refresh jobs are handed down that channel, executed against the local source by the gateway, and the results are pushed back up encrypted. No inbound port is opened. ## The rule of thumb Ask one question: *can a machine in Microsoft's cloud reach this endpoint on its own?* If yes, no gateway. If no, gateway. The trap is that "cloud source" is not the same as "reachable". An Azure SQL Database configured with a private endpoint and public access disabled is a cloud source that still needs a gateway (or a VNet data gateway, the managed variant that lives inside your Azure virtual network rather than on a VM you patch). The other trap runs the opposite way: a file on the analyst's laptop, or a UNC path to a departmental share, is an on-premises source even though nobody thinks of it as a "server". A model built on `C:\Users\me\sales.xlsx` will refresh happily in Desktop and fail on every schedule in the Service. ## Standard mode versus personal mode These are two installation modes of the same download and they are not equivalent. **Standard mode** ("on-premises data gateway"): installed as a Windows service on a server, registered to the tenant, administered by gateway admins who define *data source* connections on it and grant users the right to bind semantic models to those connections. It supports scheduled **import** refresh, **DirectQuery** and **live** connections, and is used by Power Apps, Power Automate and Azure Analysis Services as well. Multiple gateway installations can be joined into a **cluster** so a single node going down does not stop refresh, and so load spreads across nodes. **Personal mode** ("on-premises data gateway (personal mode)"): installed on an individual's machine, usable only by that person, no shared data source administration, and — the decisive limitation — **import refresh only**. No DirectQuery, no live connection. If the laptop is asleep, hibernating or off the VPN when the schedule fires, the refresh fails. It exists so a single analyst can prototype, and it is a recurring production incident when someone quietly relies on it. ## What refresh needs besides connectivity A gateway solves reachability, not authorisation. Refresh also requires that credentials be stored on the semantic model (or on the gateway data source) and that they still be valid — OAuth tokens for cloud sources expire and must be re-signed-in, which is a classic "it worked for three weeks then broke" failure. Privacy levels configured on the data sources also matter: incompatible privacy levels can block a query that combines two sources, failing refresh with a data-privacy/firewall error even though both sources are reachable. ## DirectQuery and live are not exempt People sometimes assume the gateway is a refresh-only concern. It is not. A DirectQuery model over on-premises SQL Server sends *every user interaction* through the gateway at query time, and a live connection to an on-premises Analysis Services model does the same. That makes gateway sizing, placement (close to the data source, on a machine with good network and CPU) and clustering an interactive-performance concern, not just a nightly-batch one — and it is why personal mode, which cannot do DirectQuery at all, is disqualifying for those models. ## Refresh frequency and capacity Scheduled refresh frequency is capped, and the cap depends on the capacity the workspace sits in: workspaces on shared capacity have long been limited to a small number of scheduled refreshes per day (documented as eight), while dedicated/Premium-style capacity allows substantially more (documented as forty-eight) and additionally exposes the XMLA endpoint, which lets external tools trigger refresh programmatically. These numbers have moved with the platform's licensing generations, so state the shape of the rule in an interview and check the current documentation before you design to a number. Either way, the gateway itself is not the limiter — the capacity is. ## Answer shape "Gateway when the Service can't reach the source: on-prem or private-network. Standard mode for anything shared or DirectQuery, clustered for availability, sited near the source. Personal mode is import-only and single-user, so it's a prototype tool. And remember reachability isn't the only failure mode — expired credentials and privacy levels break refresh with the gateway working fine."

  • What can standard mode do that personal mode cannot?
    Standard mode supports DirectQuery and live connections as well as import refresh, is shared across users and workspaces with centrally administered data sources, and can be clustered across machines for availability and load spreading. Personal mode is import-refresh only, tied to one user's account and machine, and fails whenever that machine is off or off-network.
  • A model reads an Azure SQL Database. The team insists no gateway is needed, but refresh fails to connect. What do you check?
    Whether the database still has a public endpoint. If it was moved behind a private endpoint, or public network access was disabled for compliance, the Service can no longer route to it and you need an on-premises data gateway on a VM in that network or a VNet data gateway. 'Cloud' does not imply 'reachable from the Service'.
  • Refresh worked for weeks and now fails with an authentication error, gateway online. What is the usual cause?
    Stored credentials on the semantic model went stale: an OAuth token expired or was revoked, a service account password rotated, or MFA was enforced on the account being used. The fix is re-entering credentials on the model or the gateway data source, and the durable fix is a service principal or service account with a managed rotation story rather than a person's login.
  • Why does gateway placement matter for a DirectQuery model?
    Every visual interaction becomes a query that travels user → Service → gateway → source and back, so the gateway sits on the interactive path. Put it near the data source with good network and CPU headroom, size it for concurrency, and cluster it — a slow or single-node gateway shows up to users as a sluggish report, not as a failed nightly job.

saying these in an interview costs you the question

  • Says any cloud data source never needs a gateway
  • Thinks the gateway requires opening an inbound firewall port
  • Treats personal mode as suitable for shared production refresh
  • Believes DirectQuery over on-prem sources bypasses the gateway
  • Assumes a working gateway guarantees refresh succeeds

context