The three SAS types, what each can grant, how they're signed, and how to revoke one when a token leaks.
From Ultra Transcenders AZ-104 by Tony Rough
A shared access signature (SAS) is a signed URL token that delegates limited, time-boxed access to storage without handing out an account key. Choosing the right type and filling in its fields with least privilege is a core administration skill.
| SAS type | Signed with | Scope | Works with Shared Key disabled? |
|---|---|---|---|
| User delegation SAS | Microsoft Entra ID (Azure AD) credentials | Blob storage historically; today also Queue, Table and Azure Files | Yes |
| Service SAS | Account key | One service (e.g. a container) | No |
| Account SAS | Account key | Allowed services only (can span Blob, Files, Table, Queue) | No |
Because service and account SAS tokens are signed with an account key, regenerating that key revokes every service and account SAS signed with it, and they must be reissued. A user delegation SAS is secured with Microsoft Entra credentials and isn’t affected by key rotation.
A service (container) SAS can grant read on every blob in a container over HTTPS and HTTP. It is the tool for scoped, time-limited access, such as read access that expires after 30 days.
To revoke a user delegation SAS, revoke the account’s user delegation keys (Revoke-AzStorageAccountUserDelegationKeys or az storage account revoke-delegation-keys), or change or remove the role assignment of the security principal that created it. (See Figure 5.1.)
| Field | Values and meaning |
|---|---|
| Allowed services (ss) | Blob only = b. A Table-only SAS can’t reach blobs or files, whatever its permissions |
| Allowed resource types (srt) | Service = service-level APIs (list containers); Container = list blobs in a container; Object (o) = read/download individual blobs |
| Permissions (sp) | Read (r) to download, List (l) to enumerate. Write, Delete, Add, Create, Update, Immutable storage, Permanent delete not needed; Process is for queue messages |
| Allowed protocols (spr) | HTTPS only, or HTTPS and HTTP |
| Allowed IP range (sip) | Requests from outside the range are denied, even if otherwise valid |
r) to any client that presents it within its start/expiry window, IP range and allowed protocols. Outside those limits, requests are denied; the client isn’t prompted for credentials.net use) doesn’t accept a SAS as the password; SMB needs the account key or identity-based authentication.A SAS expiration policy (sasPolicy) sets a recommended upper limit on SAS validity. Historically the portal setting was “Allow recommended upper limit for shared access signature (SAS) expiry interval” (for example, 7 days), which only warned when a SAS exceeded it; today you enable Shared access signature (SAS) expiration policy under Configuration, set the Upper limit for SAS expiry interval, and choose the expiration action: Log (the default, which warns and logs) or Block (which denies requests made with an out-of-policy SAS). Lifecycle management, Azure Monitor alerts and read-only locks don’t do this job.
This note is one section of Ultra Transcenders AZ-104: Microsoft Azure Administrator, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.
About the book · Free AZ-104 glossary · All AZ-104 study notes
Where LRS, ZRS, GRS, RA-GRS, GZRS and RA-GZRS keep your copies, what each survives, and which account types support them.
How the storage account firewall decides who gets in: IP rules, VNet rules with service endpoints, private endpoints and the trusted-services exception.
The order Azure applies subnet and NIC network security groups for inbound and outbound traffic, how priority works, and a worked example.
What a private endpoint puts in your subnet, how private DNS zones make names resolve to it, and when to choose it over a service endpoint.
Which App Service tiers allow manual scale-out, autoscale, slots and how many instances, and the difference between scaling up and scaling out.
Fault and update domains, zones, the SLA each gives, and what you can and can't change after a VM is created.
What delete and read-only locks block, how they inherit, and the surprising things a ReadOnly lock stops (like listing storage keys).