SYSTEM$FETCH_EXTERNAL_SECRET_FROM_INTEGRATION

functionnot supportedIntegrations, network & secretspreview

docs.snowflake.com ↗

System functions

Fetches one secret value through an external secret provider security integration.

Syntax

SYSTEM$FETCH_EXTERNAL_SECRET_FROM_INTEGRATION( '<integration_name>' , '<secret_identifier>' )

Parameters

NameRequiredDescription
integration_namerequiredName of an external secret provider security integration with TYPE = API_AUTHENTICATION and AUTH_TYPE = WORKLOAD_IDENTITY_FEDERATION.
secret_identifierrequiredProvider-specific identifier for exactly one secret: Provider Required identifier AWS Secrets Manager Full secret ARN, without a version or stage qualifier appended Azure Key Vault Secret name returned by SYSTEM$LIST_EXTERNAL_SECRETS Google Cloud Secret Manager Secret ID returned by SYSTEM$LIST_EXTERNAL_SECRETSExpandShow lessSee more

Returns

Returns a provider-specific JSON object that contains the secret value and metadata. Every provider response includes name, value, and version_id. AWS responses include arn; Azure and Google Cloud responses include id. Example response from AWS Secrets Manager:

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes USAGE | Integration | Required on the specified integration. The USAGE privilege authorizes the current role to use the integration, including through role inheritance. The cloud permissions granted to the integration’s federated identity determine which operations the integration can perform and which secrets it can access. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.