How to Create a Stored Access Policy for an Azure Blob Container

November 3, 2026

A stored access policy provides server-side control over service shared access signatures (SAS) associated with an Azure Blob container. It can define permissions and validity times, and allows associated access to be changed or revoked later.

Check whether this policy fits

Stored access policies work with service SAS, not user delegation SAS or account SAS. Microsoft recommends user delegation SAS when SAS access is needed and that option is suitable. This guide applies when your approved design specifically requires a service SAS with a stored policy.

You need an existing storage account and container, plus authorised access to manage its access policy. The underlying Set Container ACL operation requires Shared Key authorisation; an Entra data role alone does not authorise it. If your organisation blocks Shared Key, use its approved access design rather than enabling it simply to follow this guide.

Create and save the policy

  1. In the Azure portal, open the storage account and select Data storage > Containers.
  2. Select the checkbox beside the target container.
  3. Open its More (…) menu and select Access policy.
  4. Under Stored access policies, select + Add policy.
  5. Enter a unique Identifier and choose the required permissions.
  6. Set the intended start and expiry times, checking the time zone.
  7. Select OK, then select Save in the Access policy pane.

OK alone is not enough. The policy is not applied to the container until you select Save.

Verify before using it

Reopen Access policy and check the identifier, permissions, and times. Creating the policy does not generate a SAS or attach the policy to existing independent tokens. A service SAS must reference it to inherit its constraints.

Test with a non-sensitive sample and a service SAS explicitly associated with the policy. Confirm the intended operation works and an excluded operation is denied. Keep the token out of public notes and screenshots.

Limits and later changes

A container supports up to five stored access policies. Creation or changes can take up to 30 seconds to take effect; associated requests can temporarily return 403.

Deleting a policy, changing its identifier, or setting its expiry in the past can revoke associated SAS access. Review every dependent application before making such a change.

Sources

Topics:
Read next