In Power Query, privacy level mismatches occur when a single query attempts to combine or evaluate data from two or more distinct data sources that carry conflicting privacy classifications. When this happens, Power Query’s Data Mashup Engine blocks evaluation and returns Formula.Firewall: Query references other queries or steps, so it may not access a data source directly with different privacy levels.
Quick Answer
Go to File > Options and Settings > Data Source Settings. Review each connected data source and set its Privacy Level to match the other sources (typically Organizational for internal workplace sources). If you are building local analytical reports on non-sensitive data and need an immediate resolution, open Query Options > Privacy and select Ignore the Privacy levels and potentially improve performance.
What Privacy Levels Actually Do
Power Query is designed to protect enterprise security boundaries. When you merge or filter data across systems, Power Query tries to optimize execution using Query Folding, sending calculations directly to the remote server.
However, consider this risk:
- You have a Private local Excel file containing confidential employee salary bands.
- You connect to an external Public or third-party cloud database.
- If Power Query folded a join between these sources, it might transmit the confidential salary keys to the external server as part of a SQL
WHERE ... INclause or URL parameter.
To prevent sensitive corporate data from leaking to untrusted destinations, the mashup engine enforces strict data isolation rules across three tiers:
| Privacy Level | Isolation Level & Intended Usage |
|---|---|
| Public | Anyone can see this data. No protection applied. Safe to send into any other source. Example: Public APIs, government statistics, Wikipedia tables. |
| Organizational | Visible only to trusted internal network systems or your company’s domain. Can fold into other Organizational sources, but cannot leak to Public sources. |
| Private | Highly sensitive or confidential. Completely isolated. A Private source cannot be folded or transmitted into any other remote source under any circumstance. |
When a query attempts to send data from a Private source into an Organizational query, or combine mismatched classifications in a single step, the firewall stops execution.
Step-by-Step Resolution Methods
Method 1: Align Privacy Levels Across Connected Sources (Enterprise Safe)
The most secure, compliant fix is to assign accurate, consistent privacy levels to every participating data source.
- In Excel, go to the Data tab.
- Click Get Data > Data Source Settings.
- In the dialog, select Global permissions (or Data sources in current workbook).
- Review every connected endpoint used in your workbook (e.g., your SQL server, your local network drives, and your web endpoints).
- Select a source and click Edit Permissions….
- Change the Privacy Level dropdown to match your internal security policy:
- For corporate systems, set all internal sources to Organizational.
- Repeat this process for all sources in the query chain so no conflicting boundaries exist.
- Click OK and refresh your queries.
Method 2: Separate the Query Steps to Enable Isolation
If you must maintain strict privacy boundaries (for instance, leaving an HR source set to Private while accessing an Organizational SQL server), restructure your M-code so that the private data is not folded into the external query call.
- The Problem Pattern:
// Directly passing a local private table list into a remote SQL call Source = Sql.Database("Server", "DB", [Query="SELECT * FROM Sales WHERE ID IN (" & Text.Combine(PrivateIDs, ",") & ")"])The firewall flags this because private local data is being passed directly into an external server query string. - The Safe Architecture:
- Let Query 1 connect to the remote source and import the raw table without custom dynamic SQL injections.
- Let Query 2 pull the local private file.
- Create Query 3 that references Query 1 and Query 2, and performs a standard UI merge.
Power Query will evaluate both endpoints independently, download the data locally, and execute the join inside the local, secure mashup container without leaking keys over the network wire.
Method 3: Ignore Privacy Levels (Local Ad-Hoc Fix)
If you are developing a local reporting model on your machine and are not exposing external APIs or passing credentials outside your organization, you can disable the firewall checking mechanism entirely.
Risk Assessment: Only use this setting if your models do not pass confidential business identifiers to unapproved third-party internet APIs.
- In Excel, click File > Options and Settings > Query Options.
- Under Current Workbook, click Privacy.
- Select the radio button:
- Ignore the Privacy levels and potentially improve performance.
- Click OK.
- If you want this behavior applied across all new files on your computer, navigate to Global > Privacy in the same dialog and select Always ignore Privacy Level settings.
For an in-depth operational review of the security implications of this bypass, see Understanding the “Ignore Privacy Levels” setting: Risks and Rewards.
Diagnosing Persistent Firewall Breaks
If you have aligned your privacy settings and the engine still returns a firewall warning:
- Look for dynamic web requests where a URL string is generated using values from a previous query step.
- Dynamic URLs created without using the
RelativePathandQueryoptions insideWeb.Contentsautomatically fail firewall validation. - Check Formula.Firewall: Data privacy settings prevent combining sources to restructure complex cross-query parameter calls into compliant formats.