Home › Data Analytics › Power BI Refresh Credentials Error: Reconnect Gateway
Beginner 6 min · September 23, 2026

Power BI Refresh Credentials Error: Reconnect Gateway

Re-enter credentials with Edit credentials in dataset Settings; map on-prem sources to a running gateway with matching server names..

N
Naren Founder & Principal Engineer

20+ years shipping production backend systems. Written from production experience, not tutorials.

Follow
✓ Production
production tested
September 27, 2026
last updated
2,085
articles · all by Naren
Before you start⏱ 11 min
  • ✓A published Power BI report with scheduled refresh access
  • ✓Dataset Settings permission in the workspace
  • ✓Admin help for installing a gateway if using on-prem data
 ● Production Incident 🔎 Debug Guide
⚡Quick Answer
  • Cloud sources authenticate with credentials stored in the service; on-premises sources authenticate through an on-premises data gateway on an always-on machine
  • Open dataset Settings, expand Data source credentials, choose Edit credentials, re-authenticate, then run a manual refresh to prove green
  • In Manage connections and gateways, map the source with server and database names identical to Power BI Desktop's source step
  • Align privacy levels across merged sources and put a data-currency measure on the landing page so staleness shows itself
✦ Definition~90s read
What is Power BI Data Source Credentials Not Refreshing on Service?

Scheduled refresh is Power BI service re-running your Power Query steps on a timetable and loading the results into the dataset. For the run to touch your sources, the service must authenticate as someone the source trusts — and that authentication is the credential this article is about.

★
Think of scheduled refresh as a night-shift worker who needs keys to every building.

Cloud sources use credentials stored in the service itself: usernames, passwords, keys, and OAuth tokens entered under the dataset's Settings page. On-premises sources add a middleman, the on-premises data gateway, because the cloud cannot reach inside your corporate network.

The gateway is a small service on an always-on internal machine that stores encrypted credentials and executes queries locally.

The failure modes follow the architecture. A cloud credential fails when nothing is stored (fresh publish, wiped settings) or when the stored secret dies (rotated password, expired OAuth token, revoked consent). A gateway credential fails when the cluster is offline, when the source was never added to the cluster, or when the dataset's names do not match the gateway entry.

Privacy levels add a fourth mode: the credentials all work, but the combination of sources is refused by the data-combination firewall. Reading which mode you are in — from Refresh history's exact message — selects the fix; guessing wastes the night.

Compared with manual Desktop refresh, scheduled service refresh trades convenience for moving parts: gateways to patch, tokens to renew, schedules that disable themselves after repeated failures. The answer is visibility plus routine. Currency measures show data age on the report, failure alerts route to a living owner, and a runbook turns each rotation into three checklist lines.

That scaffolding makes expiry maintenance; skipping it makes expiry incidents.

Plain-English First

Think of scheduled refresh as a night-shift worker who needs keys to every building. Cloud keys hang on a hook in the Power BI service; on-premises keys stay with a trusted guard (the gateway) inside your office. When locks change — a rotated password, an expired token — the worker stands outside until someone cuts new keys. This article shows where each hook hangs and how to cut keys that keep working.

The dashboard was green on Friday and gray on Monday. No report changed, no database moved — but the overnight refresh failed on credentials, and every visual now shows last week's numbers with full confidence. Stakeholders quote stale figures in a meeting while you discover the failure from a forwarded screenshot.

Refresh credentials fail for boring reasons: a rotated database password, an expired OAuth token, a gateway machine that rebooted, a server name typed differently in two places. Power BI's messages name the category — missing, invalid, unreachable — but not the fix, so beginners click around Settings hoping. Each failed retry disables scheduled refresh further until someone performs the right three clicks in the right order.

This article gives you that order. You will learn where cloud credentials live versus gateway ones, how to re-authenticate each kind, why server names must match exactly, and how privacy levels silently block combined sources. At the end sits an operations setup — currency measures, failure alerts, and a rotation runbook — that turns credential expiry from a Monday surprise into a Tuesday task.

Two Credential Homes: Cloud Storage Versus the Gateway

Every refresh failure is a tale of two credential homes. Cloud sources — SaaS apps, web APIs, cloud databases — authenticate with credentials stored directly in the Power BI service under the dataset's Settings page. The service presents those credentials at each scheduled run with no middleman. On-premises sources — SQL Server behind the firewall, file shares, local Oracle — cannot be reached from the cloud at all, so a gateway machine inside your network holds encrypted credentials and executes the queries locally on the service's behalf.

Knowing which home your source uses decides every later click. A cloud credential problem is fixed in dataset Settings under Data source credentials with Edit credentials. A gateway problem is fixed under Manage connections and gateways (Settings gear in the page header), where clusters, connections, and their stored credentials live. Beginners waste sessions re-entering cloud credentials for gateway sources and restarting gateways for cloud sources. Read the source type first: if the data sits inside your network, the gateway owns the credential, full stop.

Credentials are encrypted where they rest and travel only to the machine that uses them. That is why fixes must happen in the same home: retyping a password in Desktop changes nothing in the service, and updating the gateway changes nothing for a cloud source. Keep a one-line inventory per dataset — source, home (cloud or gateway cluster name), and owner — and credential incidents shrink from investigations to lookups.

DataCurrencyMeasure.daxDAX
1
2
3
-- Data-currency card: the newest order date the refresh loaded
Data Currency = MAX ( Sales[OrderDate] )
-- If this date lags behind today, the last refresh failed
📊 Production Insight
A team re-entered a SQL password in the service three times before learning the source was gateway-bound. The gateway entry held the old password all along. Rule: identify the credential home before touching anything.
🎯 Key Takeaway
Cloud credentials live in dataset Settings; on-premises credentials live on the gateway cluster — fix each in its own home.

Reading the Failure: Missing, Invalid, or Unreachable

Power BI's refresh messages are terse but honest once you learn the vocabulary. Missing credentials means the service holds nothing for that source — typical after publishing a new dataset or reinstalling a gateway, which wipes stored credentials. Invalid credentials means it holds something stale: a rotated password, an expired OAuth token, a revoked consent. Gateway errors mean the credential exists but the road is closed: the gateway machine is offline, the source is not mapped to any cluster, or the binding names do not match.

The reading station is Refresh history on the dataset's Schedule refresh page (More options ... on the dataset). Each failed run logs its message with a timestamp, which lets you correlate: failures starting the morning after a password rotation scream invalid credentials, while failures from the first run after publish scream missing ones. Screenshot the exact message before fixing, because Edit credentials overwrites the evidence and post-mortems need the original text.

Treat repeated failures as state changes, not retries of the same event. Several failed attempts can disable the schedule, so a fix that only re-enters credentials without re-enabling and manually proving the schedule leaves the dataset green once and stale forever after. The recovery sequence is always message, credential, manual refresh, schedule re-enable, history confirmation. Skip the last two steps and you have performed hope, not operations.

RefreshRowCountCheck.daxDAX
1
2
3
-- Row-count watchdog: compare loaded rows against expectation
Loaded Row Count = COUNTROWS ( Sales )
-- Park beside a card showing yesterday's count to spot partial loads
📊 Production Insight
An admin fixed credentials but never re-enabled the disabled schedule. Dashboards froze for another week with everyone believing the fix had landed. Rule: recovery ends at a confirmed scheduled run, not a green manual one.
🎯 Key Takeaway
Missing means nothing stored, invalid means something stale, unreachable means the gateway road is closed — read Refresh history first.

Re-entering Cloud Credentials Without the Guesswork

Re-entering cloud credentials is a three-click errand once you stop fearing it. Open the dataset Settings page, expand Data source credentials, and choose Edit credentials beside the flagged source. For basic authentication, type the current username and password carefully — pasted secrets with trailing spaces are a classic repeat failure. For OAuth sources, complete the browser sign-in with the account that owns lasting consent, ideally a service account rather than a personal one tied to vacations and departures.

Confirm instead of assuming. After the success message, trigger a manual refresh from the Schedule refresh page and watch Refresh history until it reports success. That green entry is the only proof the credential works; the Edit-credentials dialog's own confirmation merely proves the format was accepted. If the manual run fails with the same message, the secret itself is wrong — verify it against the source system directly (log into the database with those credentials) before blaming Power BI.

OAuth deserves its own calendar entry. Tokens expire on the provider's schedule, not yours, and re-authentication is a recurring chore for sources that demand it. Note each OAuth source's expiry behavior in your dataset inventory and set reminders ahead of it. Teams that treat OAuth as configure-once meet it again as a Monday incident; teams that calendar it meet it as a Tuesday task with coffee.

LatestLoadByCategory.daxDAX
1
2
3
4
5
6
-- Newest load per category exposes partial-source failures
Latest Load by Category =
MAXX (
    VALUES ( DimProduct[Category] ),
    CALCULATE ( MAX ( Sales[OrderDate] ) )
)
📊 Production Insight
A personal-account OAuth consent lapsed during its owner's holiday and killed refresh for a fortnight. A service account plus a reminder ended the genre. Rule: credentials owned by people expire with people's availability.
🎯 Key Takeaway
Edit credentials in dataset Settings, then prove with a manual refresh; OAuth sources earn a calendar reminder, not blind trust.

Gateway Setup Where the Names Must Match Exactly

Gateway setup rewards precision and punishes improvisation. Install the on-premises data gateway on an always-on machine inside the network — not a laptop that sleeps — and register it to your tenant so it appears as a cluster under Manage connections and gateways. Add a connection choosing the exact data source type, then enter server and database names copied character-for-character from Power BI Desktop's source step: SERVER\INSTANCE spellings, ports, and database names must match, because the dataset binds to the gateway source by name pair.

Authentication method is a deliberate choice, not a default to accept. Windows authentication suits domain-joined database servers, Basic suits SQL logins, and OAuth2 suits sources that federate identity — pick what the DBA provisioned, and store the provisioned account, not your personal one. Under the connection you can set a privacy level; it does not apply to DirectQuery, but for refresh-based sources it joins the privacy story covered in the next section. Grant dataset users access on the connection's Users tab where the organization requires it.

Verify binding from the dataset side, never the gateway side alone. Open dataset Settings, expand Gateway connections, and confirm your cluster appears as Running and selectable for every on-premises source in the dataset. A gateway can be perfectly healthy yet unusable to a dataset whose names differ by one backslash. When the cluster is missing here, the defect is naming or mapping, not infrastructure — resist rebooting servers for a spelling problem.

GatewayBindingCheck.daxDAX
1
2
3
4
-- Gateway-bound fact check: rows per warehouse after mapping
Rows per Warehouse =
COUNTROWS ( Sales )
-- Slice by warehouse in a matrix to confirm every source bound
📊 Production Insight
A SERVER\INSTANCE versus SERVER difference hid for months behind a healthy gateway dashboard. Copy-paste of the Desktop source step fixed it in minutes. Rule: never retype a server name.
🎯 Key Takeaway
Copy server and database names from Desktop into the gateway connection; binding keys on exact names, and Running elsewhere proves nothing.

Privacy Levels: The Firewall That Wears a Credential Costume

Privacy levels are the firewall between your queries: None, Private, Organizational, and Public declare how freely each source's data may combine with others. A merge step joining a Private source with anything else is refused at refresh, even when both queries run perfectly alone in Desktop. The refusal is correct behavior guarding against leaking sensitive data across trust boundaries — but it arrives wearing a credential-adjacent error costume that sends teams chasing passwords.

Standardize levels per environment and document the standard. Company-internal systems that may freely combine sit at Organizational; truly public reference data sits at Public; sensitive HR or payroll sources stay Private and never merge with anything. Set levels in Desktop under File > Options and settings > Data source settings, republish, and mirror any service-side setting to match. Each change needs a refresh test, because the firewall evaluates the whole combination, not the edited source alone.

The notorious mashup variant deserves explicit handling: a single query mixing a cloud OAuth source with an on-premises source fails refresh in predictable ways. Split such mashups into separate queries per home, authenticate each through its own path, and combine with merge or append steps whose privacy levels you have aligned. Two clean queries plus one governed merge beats one clever query that cannot authenticate its halves.

⚠ Mismatched Privacy Levels Veto Merges
Do not mix privacy levels across queries you merge. Standardize one level per environment — Organizational for company systems — before combining sources, or the firewall will veto your refresh.
📊 Production Insight
A payroll-plus-sales merge failed refresh for weeks while passwords were rotated pointlessly. One privacy-level alignment fixed it instantly. Rule: when merges fail and passwords are fine, suspect the firewall.
🎯 Key Takeaway
Align privacy levels before merging sources; split cloud-plus-on-premises mashups into separately authenticated queries.

Scheduled Refresh That Stays Green After You Leave

A schedule that stays green is engineered, not wished. On the Schedule refresh page, set run times that respect source availability — after nightly ETL completes, not during it — and stay within the workspace capacity's daily allotment. Enable failure notifications to the current dataset owner (verify the mailbox belongs to a living teammate after every staffing change), and keep Refresh history as your audit trail: green entries with row counts that grow as expected.

Make staleness visible where viewers look. A landing-page card showing the Data Currency measure (MAX order date) plus Days Since Load turns silent failure into a number nobody can miss. Executives will report a stale currency card faster than any monitoring mail, which makes the card the cheapest alerting you own. Pair it with a row-count card when partial loads are a risk, so half-loaded data cannot masquerade as fresh.

Close the loop with a rotation runbook. Every password rotation, OAuth re-consent, and gateway patch ends with the same three lines: update the service-side credential, run a manual refresh, confirm the next scheduled run. Store the runbook beside the dataset inventory that lists each source, its credential home, and its owner. Credential incidents then become checklist executions measured in minutes, and Monday reviews quote numbers from this morning.

DaysSinceLoad.daxDAX
1
2
3
4
-- Days since the newest loaded order: the staleness alarm
Days Since Load =
DATEDIFF ( MAX ( Sales[OrderDate] ), TODAY (), DAY )
-- Pin it beside Data Currency; anything above 1 deserves a look
📊 Production Insight
A currency card on the landing page caught three silent refresh failures in a quarter before any meeting did. Viewers became the monitoring. Rule: display freshness where decisions happen.
🎯 Key Takeaway
Schedule after ETL, notify a living owner, display currency on the page, and end every rotation with credential update plus proven refresh.
● Production incidentPOST-MORTEMseverity: high

The Rotated Password That Aged Every Dashboard a Week

Symptom
All visuals rendered confidently with week-old data. Refresh history showed invalid credentials on three overnight attempts, and the schedule sat disabled while stakeholders assumed the numbers were current.
Assumption
The team assumed scheduled refresh was self-maintaining once configured. Nobody owned credential lifecycle, the database password rotation was a DBA-side event with no downstream checklist, and the currency of dashboard data was never displayed anywhere.
Root cause
A scheduled database password rotation changed the source credential while the Power BI service still held the old one. Refresh failed with invalid credentials, scheduled refresh disabled itself after retries, and nobody noticed because failure notifications reached a departed owner's mailbox.
Fix
Credentials were re-entered under Edit credentials and a manual refresh restored the data. Operations added a currency card (MAX order date) to the landing page, enabled refresh-failure mail to the dataset owner, and wrote a rotation runbook whose final steps are service-side credential update plus confirmation refresh.
Key lesson
  • Every credential has a lifecycle owner. Rotations, OAuth expiries, and gateway patches must each name the person who updates the service side the same day.
  • Data currency belongs on the report, not in Settings. A visible MAX-date card turns silent staleness into a visible fact within one glance.
  • Recovery is not done at green. Confirming the next scheduled run, the notification path, and the history entry is what keeps Monday from repeating.
Production debug guideFive checks that run in dataset Settings, Manage connections and gateways, and Desktop Data source settings.5 entries
Symptom · 01
Overnight refresh failed and nobody knows which credential broke
→
Fix
In the Power BI service, find the dataset, open its More options (...) menu, and choose Schedule refresh. Read the failure message under Refresh history or Settings: missing credentials points at Data source credentials, invalid points at rotation or OAuth expiry, and gateway errors point at Gateway connections. Name the category before clicking anything.
Symptom · 02
The message says credentials are missing or invalid
→
Fix
On the dataset Settings page, expand Data source credentials and choose Edit credentials beside the failing source. Re-enter the password or complete the OAuth sign-in, watching for a success confirmation. Then trigger a manual refresh from the same page and wait for green before re-enabling the schedule.
Symptom · 03
An on-premises source fails though its password is correct
→
Fix
From the service page header, open the Settings gear and choose Manage connections and gateways. Confirm your gateway cluster shows online, open its data sources, and compare the server and database names character-for-character with Power BI Desktop's source step. Recreate any mismatched entry with copied (not retyped) names, then return to dataset Settings and bind it under Gateway connections.
Symptom · 04
Combined queries fail with a privacy or firewall message
→
Fix
In Power BI Desktop, open File > Options and settings > Data source settings and record each source's privacy level. Sources merged in one query must hold compatible levels — Organizational across company systems is the usual standard. Change the outlier, republish, update Edit credentials in the service, and refresh to confirm the firewall error clears.
Symptom · 05
You need the schedule to stay green, not just recover once
→
Fix
Keep Schedule refresh open after the fix: confirm the next scheduled run time, verify Refresh history shows the green manual run, and check that failure notifications reach the dataset owner. Add the data-currency measure from this article to the report landing page so tomorrow's staleness announces itself instead of hiding.
Credential Error Causes, Checks, and Fixes
Root CauseHow to ConfirmFixPrevention
Cloud credential missing or expiredDataset Settings shows an error under Data source credentialsEdit credentials and re-authenticate the sourceCalendar reminder plus a currency measure on the report
On-premises source has no gateway mappingGateway connections shows no running gateway for the datasetInstall gateway, add the data source with matching namesName checklist comparing Desktop source to gateway entry
Server or database name mismatchGateway is Running but dataset cannot bind to itRecreate the gateway source with identical namesCopy names from Desktop; never retype them
Privacy levels block combined sourcesRefresh fails on merge steps with a firewall messageAlign privacy levels in Desktop and serviceStandardize levels per environment in team docs
⚙ Quick Reference
5 commands from this guide
FileCommand / CodePurpose
DataCurrencyMeasure.daxData Currency = MAX ( Sales[OrderDate] )Two Credential Homes
RefreshRowCountCheck.daxLoaded Row Count = COUNTROWS ( Sales )Reading the Failure
LatestLoadByCategory.daxLatest Load by Category =Re-entering Cloud Credentials Without the Guesswork
GatewayBindingCheck.daxRows per Warehouse =Gateway Setup Where the Names Must Match Exactly
DaysSinceLoad.daxDays Since Load =Scheduled Refresh That Stays Green After You Leave

Key takeaways

1
Cloud credentials live in dataset Settings; on-premises sources authenticate through a gateway machine inside your network.
2
Re-enter credentials with Edit credentials under Data source credentials, then prove it with a manual refresh.
3
Gateway binding keys on exact server and database names
copy them from Desktop, never retype.
4
OAuth tokens and passwords expire; pair every rotation with a service-side credential update.
5
Align privacy levels across combined sources or merges fail at refresh with firewall errors.
6
A currency measure plus failure alerts turns silent staleness into a paged task.

Common mistakes to avoid

5 patterns
×

Mashing cloud and on-premises sources into one query with OAuth

Symptom
Refresh fails with a credential error even though each source tests fine alone, because the mixed query cannot authenticate both legs through one path.
Fix
Split the queries: keep cloud and on-premises steps in separate queries, then merge or append. Configure the on-premises source on the gateway and the cloud source with its own cloud credentials, so each authenticates through its supported path.
×

Registering the gateway source under a different server name

Symptom
The gateway shows Running yet the dataset cannot use it, and scheduled refresh stays disabled with no obvious cause in the error text.
Fix
In the gateway data source settings, confirm the server and database names character-for-character against Power BI Desktop's source step. Recreate the gateway entry with the identical name when they differ.
×

Rotating a database password without updating the service

Symptom
Refresh fails overnight after a security rotation, and the morning starts with stale dashboards plus an invalid-credentials message nobody connected to the rotation.
Fix
Treat password rotations as report maintenance: update the service principal or account, then immediately re-enter credentials under Edit credentials in dataset Settings and run a manual refresh to confirm green.
×

Ignoring OAuth token expiry on cloud sources

Symptom
Refresh works for weeks then fails with invalid credentials, fixed temporarily by signing in again, until the token lapses on the next cycle.
Fix
Open dataset Settings, expand Data source credentials, and re-authenticate the OAuth source with an account whose consent persists (a service account where policy allows). Schedule a confirmation refresh right after.
×

Leaving privacy levels at mismatched defaults across sources

Symptom
A merge of two sources fails on refresh with a privacy-level or firewall message while each query refreshes fine in Desktop.
Fix
Set privacy levels consistently (Organizational for company sources is the common choice) in Desktop's Data source settings and mirror them in the service. Re-run refresh after each change until the firewall error clears.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01JUNIOR
Why do some sources need a gateway while others refresh with cloud crede...
Q02JUNIOR
How do you read a scheduled-refresh failure message?
Q03SENIOR
What are privacy levels and how do they break refresh?
Q04SENIOR
A running gateway is not offered for a dataset. How do you diagnose it?
Q05SENIOR
Design refresh operations so stale data never surprises stakeholders.
Q01 of 05JUNIOR

Why do some sources need a gateway while others refresh with cloud credentials?

ANSWER
Cloud credentials live in the Power BI service under dataset Settings and authenticate internet sources directly. On-premises sources sit behind the corporate network, so a gateway machine inside the network stores encrypted credentials and runs refresh queries on the service's behalf.
FAQ · 6 QUESTIONS

Frequently Asked Questions

01
What is the difference between cloud and gateway credentials?
02
Where do I re-enter credentials in the Power BI service?
03
How do I connect an on-premises database through a gateway?
04
Why is my running gateway not listed for the dataset?
05
How do I stop credentials from silently expiring?
06
Which error message tells me which fix to apply?
N
Naren Founder & Principal Engineer

20+ years shipping production backend systems. Written from production experience, not tutorials.

Follow
✓ Verified
production tested
September 27, 2026
last updated
2,085
articles · all by Naren
🔥

That's Power BI. Mark it forged?

6 min read · try the examples if you haven't

←
Previous
Power BI A Single Value Cannot Be Determined — DAX Context
4 / 7 · Power BI
Next
Power BI DirectQuery Not Supported for This Operation
→