PowerShell uses Azure’s REST API to make calls to Azure to generate the token. To prevent having to log into the Azure portal or, perhaps, if you’re generating SAS tokens for many storage accounts at once, you can use PowerShell. Leave all of the default checkboxes and click the Generate SAS and connection string button as shown below.Īt this point, you can copy the SAS token and paste its value wherever you need to use it. If you’d like a breakdown and explanation of each permission, check out the Microsoft docs. For this article, you’re going to assign full permissions and leave the default expiration time of eight hours. There are many permissions you can grant SAS tokens and start/end times.
You can see an example of what this might look like below.
To create a token via the Azure portal, first, navigate to the storage account you’d like to access under the Settings section then click Shared access signature. By using the Azure portal, you can navigate the various options graphically. The most straightforward way to generate a SAS token is using the Azure Portal. Generating a SAS Token using the Azure Portal Windows PowerShell 5.1 or PowerShell Core 6+ if generating a SAS token via PowerShell.This is required only if you will generate Shared Access Signature tokens using PowerShell Please refer to Create a storage account to learn more. If you do not have this yet, you can request for a trial subscription. If you’d like to follow along, be sure you have the following prerequisites met.
You’ll learn hands-on how to perform a few different tasks in this article. Generating a SAS Token using PowerShell.Generating a SAS Token using the Azure Portal.