79775028

Date: 2025-09-25 15:22:58
Score: 1
Natty:
Report link

I just finally got this to work. I had tried all the documentation that you reference without success. This time around I used the PowerShell script included in this Snowflake quick start to setup the Oauth resource and client app.

https://quickstarts.snowflake.com/guide/power_apps_snowflake/index.html?index=..%2F..index#2

After using the PowerShell script to setup the enterprise apps I was still getting the bad gateway error. In my case it turns out that Power Automate was successfully connecting to Snowflake but was failing to run this connection test.

USE ROLE "MYROLE";

USE WAREHOUSE "COMPUTE_WH";

USE DATABASE "SNOWFLAKE_LEARNING_DB";

USE SCHEMA "PUBLIC";SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PUBLIC'

-- PowerPlatform-Snowflake-Connector v2.2.0 - GET testconnection - GetInformationSchemaValidation

;

I had created a Snowflake trail account to test the Oauth connection and in that account the COMPUTE_WH warehouse was suspended. As a result the test connection query was failing. After discovering that Power Automate was successfully connecting to Snowflake I just do proper setup on the Snowflake side to get the query to run (create running warehouse, database, schema, table all usable by specified user and role).

Here are somethings to check:

  1. If you have access to Entra ID check the sign-in logs under the service principal sign-ins tab. Verify your sign-in shows success.

  2. In Snowflake check the sign-in logs for the user you created.
    SELECT * FROM TABLE(information_schema.login_history()) WHERE user_name = '<Your User>' ORDER BY event_timestamp DESC;

  3. Verify that you created user has default role, warehouse and name space specified.

  4. If Power Automate was able to login check the query history for your user and see if/why the connection test query failed.

  5. If Power Automate is successful in connecting to Snowflake but failing to run the connection test query you could try Preview version of Power Automate Add Connection window. I see it has a check box you can skip the connection test.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Snowflake Tony