- Snowflake Account Admin — Creates the OAuth integration in Snowflake
- Replit Workspace Admin — Configures the connector in Replit
- Builder — Signs in and starts building
Create the OAuth integration in Snowflake
The Snowflake Account Admin creates an OAuth Security Integration that allows Replit to authenticate with Snowflake.Prerequisites
ACCOUNTADMINrole in Snowflake- Access to run SQL in Snowflake worksheets
Run the setup script
Log in to Snowflake
Open your Snowflake account and make sure you are using the
ACCOUNTADMIN role. You can verify this in the role dropdown in the top-right corner.Run the OAuth integration script
Copy and paste the following SQL script and run it:
Create OAuth integration
Setting
BLOCKED_ROLES_LIST = () ensures no roles are blocked from using the integration. Without this, you may get “invalid consent request” or “role blocked” errors when connecting.Configure the connector in Replit
The Replit Workspace Admin adds the Snowflake credentials to Replit. Once configured, anyone on the team can sign in.This step requires a Teams or Enterprise plan with admin access.
Sign in to Snowflake
Any team member with access to the connector can sign in. Sign in from the Integrations page first to verify the connection before using it with Agent.Enter your Snowflake Account ID
The OAuth prompt asks for your Snowflake Account ID.To find your Account ID, look at your Snowflake URL:Take the two parts after
app.snowflake.com/ and join them with a hyphen:The URL uses a
/ between the two parts, but the Account ID uses a - instead.Start building with your Snowflake data
After connecting, you can use the Snowflake connector with Agent in two ways:- Slash command — Type
/snowflakein the prompt to use the connector - Natural language — Ask Agent to use your Snowflake data directly
Troubleshooting
Invalid consent request or role blocked error
Invalid consent request or role blocked error
Your Snowflake integration may have roles blocked by default.Verify your integration was created with If the error persists, check that your default role is not blocked:
BLOCKED_ROLES_LIST = (). If you already created it without this setting, run:Fix blocked roles
Set default role
404 error on authentication
404 error on authentication
Verify that the redirect URI in your Snowflake integration is exactly:Any mismatch causes a 404 during the OAuth flow.
Invalid scope error
Invalid scope error
Make sure the connector scope in Replit is set to
refresh_token only. Remove any other scopes like session:role-any or session:role:PUBLIC.Failed to connect error
Failed to connect error
Verify that the Client ID and Client Secret in Replit match what Snowflake generated. Re-check by running:
Verify credentials
Related documentation
- Warehouse Connectors — Overview of all supported warehouse connectors
- Connectors for Organizations — Centralized connector management for Teams and Enterprise
- Snowflake — Configure OAuth for custom clients — Snowflake’s OAuth documentation