Connecting a Snowflake account
Overview
To onboard your Snowflake environment to DigiUsher, create a dedicated read-only role and service user, grant the necessary privileges, and authenticate via key-pair authentication. This document describes exactly what permissions are requested, why each is needed, and what credentials to provide.
Summary of Access Required
| Component | Details |
|---|---|
| Identity | Dedicated service user — digiusher_reader |
| Authentication | Key-pair (ECDSA P-384 public/private key) |
| Data | Organization-level usage and billing views in the SNOWFLAKE shared database |
| Capability | What It Provides |
|---|---|
| Billing data | Cost analytics, chargeback/showback, budgeting, forecasting, anomaly detection |
DigiUsher cannot create, modify, or delete any of your Snowflake resources.
Prerequisites
Information to Gather
| Item | How to Find | DigiUsher Field |
|---|---|---|
| Organization name | Run SELECT CURRENT_ORGANIZATION_NAME() in a worksheet (see Step 2) | org_name |
| Account name | Run SELECT CURRENT_ACCOUNT_NAME() in a worksheet (see Step 2) | account_name |
| Username | The service user you create in Step 3 (digiusher_reader) | username |
| Role | The read-only role you create in Step 3 (digiusher_reader_role) | role |
| Warehouse | The warehouse the role is granted usage on (Step 4, e.g. COMPUTE_WH) | warehouse |
| Private key | Generated locally during setup (Step 6) — full PEM including the -----BEGIN PRIVATE KEY----- / -----END PRIVATE KEY----- lines | private_key |
Roles Required by the Person Performing Setup
| Role | Why |
|---|---|
| ACCOUNTADMIN | To create the role, user, and apply all account-level grants |
| ORGADMIN | To grant the ORGANIZATION_USAGE_VIEWER, ORGANIZATION_BILLING_VIEWER, and related database/application roles that expose cross-account billing data |
ORGADMIN is separate from ACCOUNTADMIN
ORGADMIN is not included in ACCOUNTADMIN by default. If your setup user does not already have the ORGADMIN role, an existing ORGADMIN must grant it first — see Step 1 below.
Network & Email Access (For Regulated Environments)
If your organization restricts outbound internet access or email domains, ensure the following are in place before starting:
- Domain allowlist: Add
*.digiusher.comto your network/firewall allowlist so that users in your organization can access the DigiUsher platform from their browsers. - Email allowlist: Add
digiusher.comas an approved sender domain in your email security gateway. DigiUsher sends onboarding confirmations, alerts, and reports from@digiusher.comaddresses.
Manual Setup
Step 1 — Grant ORGADMIN to Your Setup User (if needed)
Skip this step if your user already has the ORGADMIN role.
Sign in as an existing ORGADMIN and run the following, replacing <your_username> with the Snowflake username of the person performing setup:
USE ROLE ACCOUNTADMIN;
GRANT ROLE ORGADMIN TO USER <your_username>;
Step 2 — Find Your Organization and Account Names
Run the following query in a Snowflake worksheet to retrieve the two identifiers DigiUsher needs:
SELECT
CURRENT_ORGANIZATION_NAME() AS org,
CURRENT_ACCOUNT_NAME() AS account;
Note down both values — you will enter them in DigiUsher in the final step.
Step 3 — Create the Role and Service User
Run the following block in a worksheet as ACCOUNTADMIN to create a dedicated read-only role and service user:
USE ROLE ACCOUNTADMIN;
CREATE ROLE IF NOT EXISTS digiusher_reader_role;
CREATE USER IF NOT EXISTS digiusher_reader
DEFAULT_ROLE = digiusher_reader_role
DEFAULT_WAREHOUSE = COMPUTE_WH
COMMENT = 'Read-only DigiUsher service account';
GRANT ROLE digiusher_reader_role TO USER digiusher_reader;Replace COMPUTE_WH with the warehouse you want DigiUsher to use if it differs.

Step 4 — Grant Warehouse Usage
Grant the role permission to use the warehouse so DigiUsher can run queries:
-- Replace COMPUTE_WH with the warehouse you want DigiUsher to use.
-- Run SHOW WAREHOUSES; to see what's available.
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE digiusher_reader_role;
Step 5 — Grant Access to Billing and Usage Data
These grants give the role read-only access to the Snowflake-shared SNOWFLAKE database and the organization-level views DigiUsher queries for cost and usage data.
Run the account-level grants first as ACCOUNTADMIN, then switch to ORGADMIN for the organization-scoped grants. Snowflake only allows one active role at a time, so the organization-level grants must be run with ORGADMIN as the active role (see Step 1 if your user does not yet hold it).
-- ── Account-level grants (run as ACCOUNTADMIN) ─────────────────────────────
USE ROLE ACCOUNTADMIN;
-- Access to the SNOWFLAKE shared database (unlocks the ACCOUNT_USAGE views)
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE digiusher_reader_role;
-- Lets the reader use the Snowsight cost UI and usage table functions
GRANT MONITOR USAGE ON ACCOUNT TO ROLE digiusher_reader_role;
-- Read-only account-level usage (application + database role)
GRANT APPLICATION ROLE SNOWFLAKE.APP_USAGE_VIEWER
TO ROLE digiusher_reader_role;
GRANT DATABASE ROLE SNOWFLAKE.USAGE_VIEWER
TO ROLE digiusher_reader_role;-- ── Organization-level grants (run as ORGADMIN) ────────────────────────────
USE ROLE ORGADMIN;
-- Read-only organization billing (application role)
GRANT APPLICATION ROLE SNOWFLAKE.APP_ORGANIZATION_BILLING_VIEWER
TO ROLE digiusher_reader_role;
-- Organization-level database roles (cross-account billing views)
GRANT DATABASE ROLE SNOWFLAKE.ORGANIZATION_USAGE_VIEWER
TO ROLE digiusher_reader_role;
GRANT DATABASE ROLE SNOWFLAKE.ORGANIZATION_ACCOUNTS_VIEWER
TO ROLE digiusher_reader_role;
GRANT DATABASE ROLE SNOWFLAKE.ORGANIZATION_BILLING_VIEWER
TO ROLE digiusher_reader_role;
Organization grants require ORGADMIN as the active role
The GRANT APPLICATION ROLE SNOWFLAKE.APP_ORGANIZATION_BILLING_VIEWER and GRANT DATABASE ROLE SNOWFLAKE.ORGANIZATION_* statements must be run with ORGADMIN as the active role — running them as ACCOUNTADMIN will fail. Run USE ROLE ORGADMIN; first, as shown above. See Step 1 to grant ORGADMIN to your user if needed.
Step 6 — Set Up Key-Pair Authentication
Snowflake supports key-pair authentication for service accounts. DigiUsher uses ECDSA P-384 keys.
Generate the Key Pair
Run the following on your local machine:
# Generate an ECDSA P-384 private key (unencrypted, PKCS#8)
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -out digiusher_ec_key.p8
# Derive the public key
openssl pkey -in digiusher_ec_key.p8 -pubout -out digiusher_ec_key.pubRegister the Public Key
Copy the contents of digiusher_ec_key.pub, remove the -----BEGIN PUBLIC KEY----- header, -----END PUBLIC KEY----- footer, and all newlines, leaving a single base64 string. Then register it as a named key pair on the user in a Snowflake worksheet:
ALTER USER digiusher_reader
ADD KEY PAIR digiusher_reader_p384
PUBLIC_KEY = '<paste-public-key-contents-here>';
Save your private key
You will paste the contents of digiusher_ec_key.p8 into DigiUsher in the next step. Store this file securely — it cannot be retrieved from Snowflake once registered.
Connect in DigiUsher
After completing the setup steps, enter the following into DigiUsher to complete the connection:
| Field | Where to Find |
|---|---|
| Connection Name | Any label you prefer (e.g. Snowflake Production) |
| Organization Name | The org value from Step 2 |
| Account Name | The account value from Step 2 |
| Username | digiusher_reader (created in Step 3) |
| Role | digiusher_reader_role (created in Step 3) |
| Warehouse | The warehouse granted in Step 4 (e.g. COMPUTE_WH) |
| Private Key | Contents of digiusher_ec_key.p8 — the full PEM including the -----BEGIN PRIVATE KEY----- / -----END PRIVATE KEY----- lines |
Verification Checklist
- ORGADMIN role granted to setup user (or confirmed already held)
- Organization name and account name noted from Step 2
-
digiusher_reader_roleanddigiusher_readercreated - Warehouse
USAGEgrant applied todigiusher_reader_role - Account-level grants (
IMPORTED PRIVILEGES,MONITOR USAGE,APP_USAGE_VIEWER,USAGE_VIEWER) executed asACCOUNTADMIN - Organization-level grants (
APP_ORGANIZATION_BILLING_VIEWER,ORGANIZATION_*database roles) executed asORGADMIN - ECDSA P-384 key pair generated and public key registered via
ALTER USER ... ADD KEY PAIR - Organization name, account name, username, role, warehouse, and private key entered in DigiUsher
- Verification probe passed — DigiUsher confirms access to
SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILYand returns cost records -
*.digiusher.comallowlisted in your network/firewall (if applicable) -
digiusher.comallowlisted as an approved sender domain in your email security gateway (if applicable)
Security
What DigiUsher CAN Access (Read-Only)
SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY— daily credit consumption and cost per account across the organizationSNOWFLAKE.ORGANIZATION_USAGE.*— organization-wide usage views (compute, storage, data transfer)SNOWFLAKE.ACCOUNT_USAGE.*— account-level resource usage metadata- Views accessible via
SNOWFLAKE.USAGE_VIEWER,ORGANIZATION_BILLING_VIEWER, and related database roles
What DigiUsher CANNOT Do
- Access any user tables, databases, or schemas outside the
SNOWFLAKEshared database - Read query results, stage contents, or any business data
- Create, modify, or delete any object in Snowflake
- View or modify billing settings, warehouse configurations, or account parameters
- Make purchases or changes to your Snowflake contract
Monitoring
Monitor digiusher_reader activity in SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY, filtering on USER_NAME = 'DIGIUSHER_READER'. This provides a full audit trail of every query run by the service account.
Credential Rotation
- Generate a new ECDSA P-384 key pair (repeat Step 6).
- Register the new public key under a second named key pair, so both keys are active during the switch-over and there is no interruption:
ALTER USER digiusher_reader ADD KEY PAIR digiusher_reader_p384_new PUBLIC_KEY = '<new-public-key>'; - Update the Private Key in DigiUsher with the new private key.
- Once DigiUsher reconnects successfully, remove the old key pair:
ALTER USER digiusher_reader DROP KEY PAIR digiusher_reader_p384;
Revocation
To immediately revoke DigiUsher's access, drop the user:
USE ROLE ACCOUNTADMIN;
DROP USER digiusher_reader;
DROP ROLE digiusher_reader_role;Alternatively, to suspend access temporarily without dropping the user:
ALTER USER digiusher_reader SET DISABLED = TRUE;Troubleshooting
GRANT DATABASE ROLE fails with "Insufficient privileges"
- The
ORGANIZATION_*database roles require the executing user to have theORGADMINrole in addition toACCOUNTADMIN. RunUSE ROLE ORGADMIN;before the failing statements, or grantORGADMINto your user (Step 1) and retry.
Authentication failure (key-pair)
- Verify the private key entered in DigiUsher is from the same ECDSA P-384 key pair whose public key was registered via
ALTER USER ... ADD KEY PAIR— they must match. - If you regenerated the key pair but only registered the new public key without updating DigiUsher's private key (or vice versa), authentication will fail. Ensure both are updated together.
SNOWFLAKE.ORGANIZATION_USAGE views return no rows
- Organization-level views are only populated for accounts enrolled in Snowflake's organization features. Confirm your account is part of an organization:
SELECT CURRENT_ORGANIZATION_NAME();should return a non-null value. - Some views may have a 24-hour lag. If the account was very recently provisioned, wait one day and retry.
GRANT IMPORTED PRIVILEGES fails
- This grant requires the role executing it to be
ACCOUNTADMIN. Verify your session role withSELECT CURRENT_ROLE();before running the grant.
Warehouse access denied
- Confirm
GRANT USAGE ON WAREHOUSE <warehouse> TO ROLE digiusher_reader_rolewas applied to the correct warehouse name (case-insensitive, but must match exactly). - Run
SHOW GRANTS TO ROLE digiusher_reader_role;to verify all expected grants are present.
No cost data visible after connection
- Run the verification query below to confirm the service account can see data before reporting an issue:
SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY ORDER BY USAGE_DATE DESC LIMIT 5;
- If this returns rows when run as
digiusher_readerbut DigiUsher shows no data, contact support with the connection name and the output ofSHOW GRANTS TO ROLE digiusher_reader_role;.
Need Help?
If you encounter any issues not covered above, contact DigiUsher support at support@digiusher.com and the team will help you get set up.
DigiUsher Documentation