Hi @Jerry Pan ,
Thank you for posting query in Microsoft Q&A Platform.
If you would like to use SAS token to access storage, then try to have your SAS token in Key Vault and read it from there.
Store your SAS token in Key vault secret and get that value in notebook.
Below is the code to get secret value.
mssparkutils.credentails.getSecret('<keyvalutName>','<secretName>')
Make sure, you configure access to Azure Key Vault for Synapse Notebook.
Please Note,
- Synapse notebooks, use Azure active directory (Azure AD) pass through to access Azure Key Vault.
- Synapse pipelines use workspace identity (MSI) to access Azure Key Vault.
- To make sure your code work both in notebook and in Synapse pipeline, grant secret access permissions for both your Azure AD account and workspace identity.
Please check below video, which has complete demo of above.
Configure access to Azure Key Vault for Synapse Notebook in Azure Synapse Analytics
Hope this helps. Please let me know how it goes.
Please consider hitting Accept Answer
button. Accepted Answers help community as well.