# 550021: Insufficient warehouse permissions

Log Type: TWILIO

Log Level: ERROR

## Description

The credentials configured for this warehouse source lack the permissions required to run the sync. Twilio authenticated with the warehouse successfully; however, the database user cannot read the tables, views, or schemas referenced in the dataset configuration.

### Possible causes

* The warehouse user doesn't have `SELECT` privileges on one or more tables or views referenced in the dataset's SQL query.
* The user lacks `USAGE` privileges on the schema or database that contains the referenced objects.
* Permissions were revoked after the source was first configured.
* The warehouse role assigned to the user doesn't include the necessary grants.

### Possible solutions

* Log in to your warehouse and review the privileges granted to the user or role configured for this source.
* Grant `SELECT` on all tables and views referenced in your dataset SQL queries and `USAGE` on the corresponding schemas and databases.
* Example (Snowflake):
  ```sql
  GRANT USAGE ON DATABASE *DATABASE_NAME* TO ROLE *ROLE_NAME*;
  GRANT USAGE ON SCHEMA *DATABASE_NAME*.*SCHEMA_NAME* TO ROLE *ROLE_NAME*;
  GRANT SELECT ON TABLE *DATABASE_NAME*.*SCHEMA_NAME*.*TABLE_NAME* TO ROLE *ROLE_NAME*;
  ```
* After you update the permissions, retry the sync from the Twilio Console.
