Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Using query with on-premise gateway

(1) ShareShare
ReportReport
Posted on by 42
I am getting an error just clicking in the query section when using an on-premise gateway.  How or where do construct a query in Power Automate to send the information back to Power Apps?
Categories:
  • Suggested answer
    PS-28031948-0 Profile Picture
    4 on at
    Using query with on-premise gateway
    This is known issue and limitation in Power Automate. The error message has the reason - "Execute Native Sql is currently not supported using an on-prem gateway connection".
     
    Please refer to SQL Server - Connectors | Microsoft Learn Section: Known issues and limitations with actions.
     
    Workaround: Instead of using "Execute a SQL Query (V2)" and writing SQL, I used "Get rows (V2)" option and hit the view (If the query is complex - create it as view). While querying the view you may use filter option with 'OData' syntax. Provided screenshot for reference. 

    Thats the work around I used. This is just a workaround to handle the current limitation.
  • Verified answer
    Michael E. Gernaey Profile Picture
    39,095 Super User 2025 Season 1 on at
    Using query with on-premise gateway
     
    So the error you are getting there, isn't related to sending data back, its simply doing something that isn't supported.
     
    If you want to send data back to a Canvas App or Model-Driven App, you must take the data you get from (whatever actions you do) and (the best way) is to form is into a JSON format.
     
    Then use the Response to a Power App action, and send it back via an outgoing string property.
     
    Then inside the App use the ParseJSON function (or depending on what you did back parse somehow) the data you want into something you can use.
     
    The above though isn't related to passing back data, its related to making an unsupported call.
     
    So make a copy to SQL
    Get your Data
    Use the Data to build a JSON structure
    Pass it back as a string in an Output parameter
    Reconstruct it into a Collection (aka JSON) in the App

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,708 Most Valuable Professional

Leaderboard

Featured topics