Forum Discussion

rpiboy_1's avatar
rpiboy_1
Icon for Helper V rankHelper V
1 year ago
Solved

Query Firewall Violation

I've read, watched videos and had lots of conversation and analysis with Perplexity. I have a query that by neccessity needs to get data from one REST endpoint then use that data to query a second, d...
  • v-kpoloju-msft's avatar
    v-kpoloju-msft
    1 year ago

    Hi rpiboy_1
    Thank you for the follow-up question. To clarify having a web call inside a function doesn’t by itself violate the firewall rules.

    The firewall is triggered when:
    • A value from one data source (e.g. admin API) is used to dynamically build or drive a request to another data source (e.g. object API).
    • Power Query can’t guarantee that sensitive information from one source isn’t being sent to the other.

    So technically, whether the Web.Contents is inside a function, or a “stand-alone” query doesn’t matter what matters is how the privacy levels are configured for the sources you’re combining. https://learn.microsoft.com/en-us/powerquery-m/web-contents 

    Function per server: You can safely parameterize the base URL (US, CA, etc.) in your function. If each function only calls one domain, the firewall won’t block it.

    Separate queries per server, then roll up: This also works, but it’s more verbose. You’d then combine those queries later.

    Both approaches are valid. The key is: if the endpoints are trusted and belong to the same system, set their Privacy Level to the same scope (e.g. Organizational). That way, the firewall won’t block cross-source logic whether it’s inside a function or separate queries.

    So the choice of “function vs. separate queries” is mostly about maintainability of your code rather than avoiding the firewall. The firewall decision is based on privacy settings, not function structure.

    Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.

    Thank you for using the Microsoft Fabric Community Forum.