Troubleshooting PingFederate OAuth
When you query a Snowflake connection that uses PingFederate as the OAuth identity provider, several failure modes can prevent the query from running. Each section below covers one error, its root cause, and how to resolve it.
Audience mismatch
SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN: Audience mismatch
Cause
The aud claim in the JWT that PingFederate issued doesn't appear in Snowflake's EXTERNAL_OAUTH_AUDIENCE_LIST on the security integration.
Solution
-
In PingFederate, open the Access Token Manager and note the Audience Claim Value.
-
In Snowflake, run
DESC SECURITY INTEGRATION <name>;and checkEXTERNAL_OAUTH_AUDIENCE_LIST. -
If the audience isn't in the list, add it:
ALTER SECURITY INTEGRATION <name>SET EXTERNAL_OAUTH_AUDIENCE_LIST = ('<existing_audience>', '<new_audience>'); -
In Atlan, confirm the Audience URI field on the connection's SSO config matches the audience configured in PingFederate.
Invalid OAuth access token
Invalid OAuth access token
Cause
Snowflake rejected the JWT Atlan sent. This is an umbrella error—the underlying reason is one of audience mismatch, invalid signature, or user not found.
Solution
-
Capture the JWT from the failing request or from Atlan's vault.
-
In Snowflake, run:
USE ROLE ACCOUNTADMIN;SELECT SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN('<paste-jwt-here>'); -
Read the specific failure from the output and follow the matching section in this guide.
Token signature invalid
SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN: Token signature invalid
Cause
Snowflake can't verify the JWT's signature. The JWKS URL is unreachable from Snowflake, or the kid in the JWT header isn't in the published JWKS.
Solution
-
Confirm
EXTERNAL_OAUTH_JWS_KEYS_URLin the security integration points to PingFederate's JWKS endpoint (typically/pf/JWKS). -
From a machine that can reach Snowflake's network, run:
curl -s https://<pf-host>/pf/JWKS | jq '.keys[] | {kid, alg, use}' -
Decode the JWT header at jwt.io and confirm its
kidmatches a key in the JWKS output. -
If the signing certificate was rotated recently, the new key may not yet be published—wait for the rotation to complete or restart PingFederate to force a refresh.
User not found
SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN: User <login> not found
Cause
The JWT's mapping claim value (typically sub) doesn't match any Snowflake user's LOGIN_NAME or EMAIL_ADDRESS, depending on EXTERNAL_OAUTH_SNOWFLAKE_USER_MAPPING_ATTRIBUTE.
Solution
-
Decode the JWT at jwt.io and note the value of the mapping claim.
-
In Snowflake, search for a user that matches:
SHOW USERS LIKE '<value-prefix>%'; -
If no user exists, create one whose
LOGIN_NAME(orEMAIL) equals the claim value:CREATE USER "<USERNAME>"LOGIN_NAME = '<claim-value>'EMAIL = '<claim-value>'DEFAULT_ROLE = '<role>'DEFAULT_WAREHOUSE = '<warehouse>'; -
If a user exists but with a different
LOGIN_NAMEformat (for example,JDOEinstead of[email protected]), choose one of these options:-
Switch the security integration to match on email:
ALTER SECURITY INTEGRATION <name>SET EXTERNAL_OAUTH_SNOWFLAKE_USER_MAPPING_ATTRIBUTE = 'EMAIL_ADDRESS'; -
Configure PingFederate to populate the mapping claim with the existing
LOGIN_NAMEvalue instead of the email.
-
See also
- Enable Snowflake OAuth with PingFederate: Full setup guide across Snowflake, PingFederate, and Atlan.
- SSO integration with PingFederate using OAuth: Reference for field mappings across the three systems.
Need help
If you remain blocked after trying these steps, contact Atlan support: Submit a request.