web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using query with on-pr...
Power Automate
Answered

Using query with on-premise gateway

(1) ShareShare
ReportReport
Posted on by 54
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:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,928 Moderator on at
     
    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
  • Suggested answer
    PS-28031948-0 Profile Picture
    4 on at
    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard