Huso
Huso

Reputation: 67

Is there any way to check programmatically whether SAS URL for Azure blob storage expired or not?

Is there any way to check programmatically whether SAS URL for Azure blob storage expired or not? I've looked through MSDN but couldn't find any useful information on that.

Upvotes: 3

Views: 1700

Answers (1)

Zhaoxing Lu
Zhaoxing Lu

Reputation: 6467

It depends on how your SAS is generated. If it's generated by account key directly, you can check se query parameter for expiry time, for example: enter image description here

If you SAS is generated by stored access policy, the expiry time can't be directly found from SAS string, you have to get properties of the corresponding stored access policy from Azure Blob Storage service, here is the API.

Upvotes: 3

Related Questions