Skill 2.1.2

Create and use shared access signature (SAS) tokens

Key Concepts

There are three kinds of SAS. A user delegation SAS is signed with a user delegation key obtained with Microsoft Entra credentials, applies to Blob Storage (and Data Lake Storage) only, and is the recommended option because no account key is involved. A service SAS is signed with an account key and grants access to one service (blob, file, queue or table). An account SAS is signed with an account key and can grant access to several services and to service-level operations.

The token's parameters include the signed permissions (sp, such as read, write, list), start and expiry times (st, se), allowed IP addresses (sip), allowed protocol (spr=https), the resource and the signature (sig). Anyone who holds the URL can use it until it expires, so short expiry times and HTTPS only are good practice. An ad hoc SAS signed with a key can be revoked early only by rotating that key; a user delegation SAS is revoked by revoking user delegation keys. A SAS expiration policy on the account recommends a maximum validity interval.