how to change the experation date of the SAS Keys

John Fabiani 25 Reputation points
2026-07-25T23:36:36.57+00:00

Change the experation date of the SAS Keys. As the keys have expired.

Azure Storage
Azure Storage

Globally unique resources that provide access to data management services and serve as the parent namespace for the services.


1 answer

Sort by: Newest
  1. AI answer

    2026-07-25T23:36:47.1966667+00:00

    For Azure Storage SAS, the expiration date of an existing SAS token cannot be changed. The expiry is built into the token when it is created.

    If the SAS has already expired, the supported options are:

    1. Generate a new SAS token with a new expiry time.
    2. If the SAS is tied to a stored access policy, change the policy expiry or recreate the SAS against that policy.
    3. If the SAS is an ad hoc SAS with no stored access policy, the only way to replace it is to issue a new SAS.

    To control SAS expiry for future tokens at the storage account level, configure a SAS expiration policy:

    Azure portal

    1. Open the storage account.
    2. Go to Settings > Configuration.
    3. Enable Shared access signature (SAS) expiration policy.
    4. Set Upper limit for SAS expiry interval.
    5. Optionally set the action to Log or Block.
    6. Select Save.

    Important notes

    • If the setting is grayed out, rotate both account access keys first.
    • A user delegation SAS has a maximum expiry interval of 7 days.
    • Azure File Sync requires the upper limit to be 3 days or greater.
    • If the storage account key creation time is null, rotate the account access keys before configuring the policy.

    If the goal is to immediately invalidate old SAS tokens, regenerating the account key used to sign them revokes them. This affects all applications using that key until they are updated, so this is a disruptive change.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.