Hi team is there any way to find SAS token expiration policy ?
Loading
Hi team is there any way to find SAS token expiration policy ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tuhin PaulRank #7 · 71.9K reputationPosted Feb 14, 2023, 7:59 AM EST
Yes, you can find the SAS token expiration policy in Azure using the Azure Portal, Azure PowerShell, or Azure CLI.
In the Azure Portal:
In Azure PowerShell:
New-AzStorageAccountSASTokento create a new SAS token for your storage account.Get-AzStorageAccountSASTokento retrieve the details of the SAS token, including the start time, expiry time, and other details.In Azure CLI:
az storage account generate-sasto create a new SAS token for your storage account.az storage account showto retrieve the details of the storage account, including the start time, expiry time, and other details of the SAS token.Rajeesh MenothRank #118 · 18.4K reputationPosted Feb 11, 2023, 12:31 PM EST
Hi,
Please check the following reference:
https://stackoverflow.com/questions/58165314/is-there-any-way-to-check-programmatically-whether-sas-url-for-azure-blob-storag
Sarthak VarshneyRank #46 · 32K reputationPosted Feb 11, 2023, 5:28 AM EST
You can programmatically parse the SAS token to extract these parameters, or you can manually inspect the token and extract the parameters by following the format of a SAS token. For example, a SAS token might look like this:
https://myaccount.blob.core.windows.net/mycontainer/myblob?st=2022-01-01T00%3A00%3A00Z&se=2022-01-02T00%3A00%3A00Z&sp=r&sv=2021-08-06&rscc=&rsce=&skoid=&sktid=&skt=&ske=&ske=&rscc=&rsce=&rs=&sp=r
In this example, the start time (
st) is set to2022-01-01T00:00:00Zand the end time (se) is set to2022-01-02T00:00:00Z. This means that the SAS token is valid from January 1st, 2022 at 00:00:00 UTC to January 2nd, 2022 at 00:00:00 UTC.So, to find the expiration policy of a SAS token, you can examine the start time and end time parameters of the token.