Reputation: 1003
In the project I am working, SAS token is used for downloading files in Azure Blob storage. Some of those tokens have expired. I want to know whether there is any way by which the expired tokens can be extended so that they can be used again.
Upvotes: 2
Views: 7772
Reputation: 136226
I want to know whether there is any way by which the expired tokens can be extended so that they can be used again.
Well, the answer is both no and yes. It actually depends on how you created a SAS token.
Assuming you have created a SAS token without using a Shared Access Policy with expiry date specified in the policy, then the answer is no. Once a token has expired, you will need to create a new SAS token with new expiry date and use that. As such there's no mechanism to extend the expiry of an existing token.
If you have created a SAS token using a Shared Access Policy and that has expiry date defined, then the answer is yes. You can simply change the expiry date in the Shared Access Policy and then the same SAS token can be used.
Upvotes: 5