In this blog post, I will show you how can you generate a SAS (Shared Access Signature) token in Azure Storage Account using Azure Portal.
A shared access signature (SAS) provides you with a way to grant limited access to objects in your storage account to other clients, without exposing your account key. You can read more about SAS using this link.
Follow the below steps to generate the token:
- To generate a SAS Token go to the Storage Account for which you want to generate a token.
- From the Storage Account blade click on Shared access signature.
- Select the appropriate options you want to allow on generated SAS token and click on Generate SAS and connection string button.
- It will generate SAS token, Connection string and Blob service SAS URL (I only selected Blob in the Allowed services section).
- Let’s test the token with a Blob. I uploaded an image file to a container called Images. The Container marked as Private so I am not able to access content.
- Now, add the SAS token in the URL and try again.
- The SAS token is working. I am able to access the content using the token.
Hopefully, someone finds this useful. Please leave a comment if I missed something or you want to add something.