Forum Discussion

ajohns3's avatar
ajohns3
Advocate I
8 months ago
Solved

Cannot set Gateway in Dataflow

Hi, I am unable to create a new dataflow that uses a gateway or to edit the gateway used by an existing dataflow.   Editing the gateway in the web interface works - going to Options -> Project Dat...
  • Mauro89's avatar
    8 months ago

    Hi ajohns3,

     

    check out if any of these fixes might work:

    1. Set gateway at the connection level: Instead of setting it in Project Data Load options, configure the gateway when you first create/edit the data source connection in Power Query. The gateway should be selected during the "Connection settings" step.

    2. Use "Configure connection" after publishing:

      • Publish the dataflow without gateway selection
      • Go to the workspace, find the dataflow
      • Click the three dots (…) → Settings → Gateway connection
      • Select your gateway there and save
    3. Check gateway permissions: Ensure you have "Can use" or "Can use with reshare" permissions on the gateway. Lack of proper permissions can cause silent failures.

    4. Browser cache/session: Clear browser cache or try in an incognito window - sometimes the UI doesn't properly commit the selection.

    5. Consider migrating to Gen2: Gen2 dataflows (Fabric) have better gateway handling and are more reliable for on-premises connections.

    If none work: This might be a tenant-level issue. Contact Microsoft Support or consider using a dataset with gateway instead of a dataflow as a workaround.

     

    Best regards!

    PS: If you find this post helpful consider leaving kudos or mark it as solution

  • wardy912's avatar
    8 months ago

    Hi ajohns3 

     

     First suggestion is move to dataflow gen2, there's been no EOL announced for gen1, but gen2 is being prioritised.

    Migrate from Dataflow Gen1 to Dataflow Gen2 - Microsoft Fabric | Microsoft Learn

    Next info is AI generated and unverified, but I hope it helps

    Why this happens (in short)

    • Gen1 editor sometimes doesn’t persist the gateway binding even though previews work. This has popped up before and was acknowledged/“fixed” in the service more than once, but similar symptoms still surface intermittently. [community....rosoft.com], [community....rosoft.com]
    • With the new Connections model, the binding that matters is often the connection-to-gateway mapping under Settings → Manage connections and gateways, not only what the Gen1 editor shows. If the underlying Connection still points to “cloud/none,” the dataflow refresh falls back to that even if the editor temporarily used your gateway. [learn.microsoft.com], [red-gate.com]
    • Gen1 is now the older generation. Microsoft’s guidance is to prefer Dataflow Gen2 for new work; investments and fixes go there first. (Gen1 isn’t deprecated, but Gen2 is the priority.) [learn.microsoft.com], [learn.microsoft.com]

    Fix that usually works (and persists)

    Goal: Make the gateway binding live in Manage connections and gateways, then ensure your Gen1 dataflow uses that exact connection.

    1. Create/verify a Connection that is explicitly mapped to your gateway

      • In Power BI Service, go to Settings → Manage connections and gateways → Connections → New.
      • Choose On-premises, pick your Gateway cluster, pick the data source type, and enter Server/Database identically to your M query (even case can matter for how Power Query resolves connections). Save credentials. [learn.microsoft.com]
      • Why: this creates a durable object the service will respect at refresh time, independent of the Gen1 editor’s transient state. [red-gate.com]
    2. Ensure you have rights to see and use the gateway and its data source

      • In Manage connections and gateways → On‑premises data gateways, confirm you (or your SPN) are an admin on the gateway and a user on the relevant data source within that gateway; otherwise the editor can’t persist the mapping. [learn.microsoft.com], [community....rosoft.com]
    3. Rebind the dataflow to the new Connection from inside the editor

      • Open the dataflow → EditOptions → Project → Data load → Data gateway and pick your gateway (or (none) if you’re moving off a gateway for a cloud source).
      • Then, for each query’s first “Source” step, click the gear and select the Connection you created in step 1. If the correct Connection doesn’t show, a simple trick is to change the case of the database or path in the M “Source” step (e.g., MyDB → mydb) to force Power Query to treat it as a new connection, then choose the right Connection (with the gateway) when prompted. This has resolved Gen1’s insistence on a gateway/no‑gateway mismatch for many folks. [sqlkover.com], [sqlservercentral.com]
    4. Save the dataflow and do a manual Refresh from the dataflow settings page (not just inside the editor). Check it still shows the gateway under Settings → Gateway and cloud connections and that the refresh uses the gateway successfully. [learn.microsoft.com]


    Things to double‑check (they commonly cause the reset)

    • Exact server/database/URL match between the Connection and your M code. If they differ (even subtly), the service may pick a different Connection (or “none”) at refresh time. [learn.microsoft.com]
    • Workspace type: Gen1 works best in new (v2) workspaces; classic workspaces have limited options and have caused confusing UX in the past. [learn.microsoft.com]
    • Credential scope & privacy levels: mismatched credentials or privacy levels cause the editor to prompt repeatedly and can prevent persisting the gateway setting. [learn.microsoft.com]
    • Gateway visibility/permissions: if you’re not on the gateway’s Users/Admins lists, the editor often shows “no gateway” even though one exists. [community....rosoft.com]
    • Recent service regressions: There’s historical precedent for “gateway not saved” bugs affecting many tenants for a few days; when in doubt, check service health or try again later. [community....rosoft.com], [community....rosoft.com]

     

    --------------------------------

    I hope this helps, please give kudos and mark as solved if it does!

     

    Connect with me on LinkedIn.

    Subscribe to my YouTube channel for Fabric/Power Platform related content!