Reputation: 49
I am new to snowflake. I am trying to create storage integration followed by stage by using azure blob storage in snowflake. I have successfully created the stage but I cannot able to access(list @mydb.extn_stages.stage_json;) the stage with following error message i.e.
Error: "Failure using stage area. Cause: [Server failed to authenticate the request. Please refer to the information in the www-authenticate header. (Status Code: 401; Error Code: InvalidAuthenticationInfo)]"
Note: I have checked the URL, Tenant Id, checked the roles, and added the all permissions in Azure but none of them worked for me.
Can anyone help me how to resolve the issue.
Here is the command(s) what I have done so far
CREATE OR REPLACE STORAGE INTEGRATION azsf_mydb_aug23
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = AZURE
ENABLED = TRUE
STORAGE_ALLOWED_LOCATIONS = ('azure://sampleblobstorage123456.blob.core.windows.net/sampleblob')
AZURE_TENANT_ID = '3b0393d8-32db-4ab6-b717-64a3193c5ace'
COMMENT = 'integration';
The above command is for creating storage integration
//creating stage object
create or replace stage mydb.extn_stages.stage_json storage_integration =
azsf_mydb_aug23 url = 'azure://sampleblobstorage123456.blob.core.windows.net/sampleblob';
Here in the below command I am getting error
//Listing files in the stage
list @mydb.extn_stages.stage_json;
Upvotes: 0
Views: 356
Reputation: 8301
Failure using stage area. Cause: Server failed to authenticate the request. (Status Code: 401; Error Code: InvalidAuthenticationInfo) in AZURE Storage
When using shared access signature, the error message states that Snowflake is unable to access the remote file and proposes that you provide Snowflake adequate access permission in Azure Blob Storage.
To resolve this:
Grant Snowflake Access to the Storage Locations
DESCRIBE INTEGRATION
command to retrieve the consent URL:DESC STORAGE INTEGRATION azsf_mydb_aug23;
AZURE_CONSENT_URL
column in a web browser. Accept the offer by clicking the Accept button. This will construct an Azure service principal for your Snowflake account on the resources selected within your tenant. as shown in AZURE_MULTI_TENANT_APP_NAME
Storage Blob Data Contributor
role to above service principal which got created in your tenant.After this you will be able to access storage account from Snowflake
Upvotes: 1