Manage Power BI data source credentials: fix refresh and connection access
Power BI data source credentials are the authentication information the service uses to connect to a source. Import model refreshes generally use saved source credentials or credentials stored on a gateway connection, so expired or changed credentials must be updated in the right place. This article focuses on semantic models in Power BI Service and the on-premises data gateway; the available authentication method depends on the connector and connection mode.
Manage Power BI data source credentials: fix refresh and connection access
Power BI data source credentials are the authentication information the service uses to connect to a source. Import model refreshes generally use saved source credentials or credentials stored on a gateway connection, so expired or changed credentials must be updated in the right place. This article focuses on semantic models in Power BI Service and the on-premises data gateway; the available authentication method depends on the connector and connection mode.
Identify where the credential is stored
Power BI has several settings that can look similar:
**Semantic model data source credentials:** Used for cloud sources that Power BI Service connects to directly. Sign in or edit them under Data source credentials in the model settings.
**Gateway connection credentials:** Stored on a gateway connection. Queries that use that connection generally run with its configured credentials. Specific SSO configurations can use the user or model owner's context.
**Power BI account sign-in:** The account used to sign in to the service. It is not necessarily the credential used to connect to the source database.
When authentication fails, first determine whether the source uses a cloud connection or a gateway connection. If the model uses several sources, inspect each connection separately. Microsoft: Manage semantic model settings · Microsoft: Manage gateway data sources
Check model ownership and connection access
Some model settings, especially scheduled refresh and data source credentials, can be configured only by the semantic model owner. If someone else owns the model, ask the owner to make the change or follow your organization's process to take over ownership. Taking over changes operational responsibility, so identify the new owner and failure-notification recipient first. Microsoft: Semantic model settings and permissions · Microsoft: Data refresh in Power BI
For a gateway data source connection, limit credential changes to its owner or an authorized connection manager. Gateway administration and permission to use a particular connection are separate. Grant connection users only the access they need and review what data the source account can read before sharing the connection. Use a least-privilege managed account and periodically review access where possible. Microsoft: Manage gateway data source users · Microsoft: Gateway implementation planning
Update credentials for a cloud source
A cloud source that Power BI Service can reach directly is generally managed under Data source credentials in the model settings. The exact menu can vary with the Service interface.
In the workspace, open **Settings** for the target semantic model.
Under **Data source credentials**, find the source with an error and select **Edit credentials**.
Choose an authentication method supported by the connector and sign in again or enter the required credentials. Do not copy passwords or tokens into documents, chats, or code repositories.
Confirm that the change was saved. Run **Refresh now** and check **Refresh history** for the result and any error details.
Credential settings may be limited to the model owner. Confirm ownership or the required permission before changing them. Credentials are source-specific; do not assume a change on one model automatically updates other models. Microsoft: Semantic model settings · Microsoft: Data refresh
Update credentials on a gateway connection
On-premises or private-network sources may require a gateway. A cloud source may also use one because it is on a private network, behind a firewall, or requires a custom connector or driver. In these cases, changing only the model's cloud credentials may not fix an authentication error on the gateway connection.
In the Service, open **Settings > Manage connections and gateways**.
Find the target connection and confirm you have permission to manage it.
Check that the connection's server and database names match those in the model published from Desktop. The instance and server naming format must also match.
Update the connection's authentication method and credentials. For example, SQL Server may use Windows or Basic (SQL authentication), but supported methods vary by connector. An OAuth2 query that runs longer than the token lifetime can fail.
If the model has multiple sources, confirm that every required source has a gateway connection.
In the model settings, check **Gateway and cloud connections** for the correct mapping. Run a manual refresh and inspect its history.
Credentials stored on a gateway connection are encrypted so they can't be decrypted in the cloud, and are used by the gateway machine when it connects to the source. They remain sensitive operational information: use a least-privilege account, name a connection owner, define a rotation process, and review connection users regularly. Microsoft: Add or remove a gateway data source · Microsoft: Gateway implementation planning
Authentication and privacy levels are different
Authentication verifies who connects to the source. A Power Query Privacy level classifies whether data may flow to another source when queries combine sources; it helps isolate queries. Set levels such as Private, Organizational, or Public to reflect the source. They are not passwords or sign-in methods. Do not ignore privacy levels just to bypass a query error: a wrong level or ignored classification can send sensitive data outside a trusted boundary. Microsoft: Privacy levels in Power Query
Microsoft documents that the privacy level set on a gateway connection applies to Import queries, not DirectQuery. If you need user-specific data security, distinguish stored shared credentials from SSO. Some supported DirectQuery SSO configurations can use the signed-in user's Microsoft Entra token or Kerberos context, while Import refresh generally uses configured credentials or the model owner's context. Confirm connector and tenant support before designing this behavior. Microsoft: Privacy levels · Microsoft: Gateway authentication and SSO
Diagnose an authentication error
Check refresh history for the failing source and time.
For a cloud source, inspect Data source credentials in model settings; for a gateway source, inspect that connection in Manage connections and gateways.
Confirm the person making the change is the model owner or has connection-management permission.
For gateway sources, check gateway status, connection-user access, and matching server/database names.
Confirm every source is mapped to the intended connection.
If authentication succeeds but refresh still fails, separately check privacy levels, network access, connector requirements, token expiry, and schema changes.
After fixing the cause, run a manual refresh and confirm success and the data timestamp in the history.
Remove passwords, access tokens, secret values in connection strings, and customer data before sharing an error. This article does not claim that any tenant credential or connection was changed or tested. Authentication options and menus vary by source, connector, and mode; verify them with an administrator and current Microsoft documentation before deployment.
Sustainable credential management means more than entering a new password. Track who owns the credentials, where they are stored, who can use the connection, whether each source is mapped correctly, and whether authentication and privacy settings behave as intended.