Categories:

System functions (System Information)

SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN¶

Determines whether your External OAuth access token is valid or has expired and needs to be regenerated.

Syntax¶

SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN( '<access_token>' )
Copy

Arguments¶

access_token

The External OAuth access token generated by your OAuth 2.0 server.

Output¶

The function returns a JSON object stating the validation result with a reason. The query result should never display the token itself. For example, an invalid token should return a masked token in the result to ensure that sensitive information is not exposed unnecessarily in Snowflake.

Column Name

Data Type

Description

Validation Result

String

A valid token returns Passed. . An invalid token returns Failed.

Reason

String

A valid token returns the Issuer URL and the user. . An invalid token states the problem with the access token (e.g. EXTERNAL_OAUTH_JWS_INVALID_FORMAT).

Examples¶

The following example returns a valid External OAuth token result:

SELECT SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN('<access_token>');

+-----------------------------------------------------------------------------------------------+
| Token Validation finished.{"Validation Result":"Passed","Issuer":"<URL>","User":"<username>"} |
+-----------------------------------------------------------------------------------------------+
Copy