Storage Storage platform template-specs-upgraded

SAS permissions

SAS permissions are the specific actions a shared access signature allows. They are usually represented as compact letters in the token, such as read, write, create, list, delete, add, update, or tag. A SAS is not a broad Azure role assignment; it is a signed data-plane grant for the resources and operations named in the token. The practical skill is matching permissions to the task. Uploading one blob does not need list, read, or delete access, and a reporting export should not receive write rights.

Aliases
shared access signature permissions, SAS permission string, signed permissions, SAS rights, sp parameter
Difficulty
intermediate
CLI mappings
4
Last verified
2026-05-22

Microsoft Learn

Microsoft Learn explains that a shared access signature gives granular control over how a client may access storage data, including which resources are reachable, which permissions are granted, and how long access remains valid. Permissions must be chosen for the SAS type, service, and intended operation.

Microsoft Learn: Grant limited access to Azure Storage resources using shared access signatures (SAS)2026-05-22

Technical context

In Azure Storage, SAS permissions are evaluated by the service endpoint when a request includes a signed token. The permission string combines with resource scope, service type, resource type, expiry, protocol, IP range, and signature. Blob, File, Queue, and Table services support different operations, and user delegation SAS has its own supported permission set. If the request tries an operation outside the signed permissions, Azure Storage returns authorization errors even when the token has not expired. Operators often see this in logs as a 403 permission mismatch.

Why it matters

SAS permissions matter because too much access changes a temporary sharing mechanism into a data-loss risk. A token meant for upload that also grants list, read, and delete can expose existing files or allow accidental cleanup. A token that is too narrow creates reliability problems: clients fail with 403 errors, retries increase, and teams waste time rotating keys that were never the issue. Least-privilege SAS design makes direct-to-storage workflows possible without handing out account keys. It also gives architects a precise way to separate business actions, such as upload, download, append, and copy, into different tokens. That precision keeps convenience from becoming uncontrolled data-plane authority.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In the portal SAS generation screen, permission checkboxes translate into the signed permission string that controls actual blob, file, queue, or table operations. during token reviews

Signal 02

In Azure CLI commands, the --permissions value shows compact letters such as r, w, c, l, or d that define what the token can do.

Signal 03

In a SAS URI, the sp query parameter contains the permission string; a missing letter can explain a 403 even when expiry is valid. quickly

Signal 04

In storage diagnostic logs, AuthorizationPermissionMismatch and related 403 details reveal that the token was valid but not authorized for the attempted operation. during support triage

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Allow browser clients to upload one blob with create and write rights without granting read, list, or delete access to the container.
  • Give a reporting partner read-only access to an export folder while blocking writes that could corrupt certified output files.
  • Issue append-focused permissions for device log ingestion so clients can add records but cannot rewrite or delete previous evidence.
  • Troubleshoot 403 errors by matching the failed storage operation to the missing permission letter instead of rotating account keys.
  • Restrict an account SAS to only the services and resource types a backup tool needs, avoiding broad account-wide data access.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Legal discovery team prevents evidence overwrite during external review

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A legal discovery team shared case evidence with outside counsel through Azure Blob Storage. Their old SAS template granted read, list, write, and delete because nobody wanted to troubleshoot permission errors during deadlines.

Business/Technical Objectives
  • Allow outside counsel to download and list evidence only.
  • Prevent overwrite or delete operations on preserved files.
  • Reduce emergency token changes during court deadlines.
  • Produce access-control evidence for internal audit.
Solution Using SAS permissions

The storage engineers replaced the broad template with two approved SAS permission profiles. External review tokens used read and list only at the container scope, with short expiry and HTTPS required. Internal upload tokens were separate and limited to create and write against a staging container. Azure CLI generated representative tokens in a test account, then engineers proved that delete and upload attempts failed before updating the production broker. Diagnostic logs were reviewed for AuthorizationPermissionMismatch during the first week so support could separate expected denials from real access issues.

Results & Business Impact
  • Delete-capable external SAS tokens dropped from 100 percent to zero.
  • Review download failures fell by 38 percent after list permission was deliberately included.
  • Audit evidence was exported in under one hour.
  • No preserved evidence files were modified during the next three discovery cycles.
Key Takeaway for Glossary Readers

SAS permissions protect storage data best when each business action receives its own narrow token instead of one convenient all-purpose link.

Case study 02

Concert venue enables fan photo uploads without exposing the gallery

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A concert venue launched a fan photo wall backed by Azure Blob Storage. The initial prototype gave upload clients read and list access, allowing curious users to browse images before moderation.

Business/Technical Objectives
  • Permit direct browser uploads without routing every image through the web API.
  • Block clients from listing, reading, or deleting other fan uploads.
  • Keep moderation and publishing permissions separate.
  • Handle upload retries during peak post-concert traffic.
Solution Using SAS permissions

The web application changed its token broker to issue SAS tokens with create and write permissions only for a single generated blob name. Read and list permissions were reserved for the moderation service, which used managed identity and internal APIs. Azure CLI tests generated the same upload token pattern in staging and attempted upload, list, read, and delete operations. Only the intended upload succeeded. The production portal logged the permission profile ID, not the SAS token, so support could investigate failures without exposing signatures. Expiry was set to twenty minutes to match observed retry behavior.

Results & Business Impact
  • Fan uploads bypassed the API and reduced web CPU by 31 percent.
  • Unauthorized gallery browsing attempts returned 403 in every test.
  • Moderation backlog stayed under five minutes during peak traffic.
  • Support resolved upload-permission tickets 52 percent faster with profile IDs.
Key Takeaway for Glossary Readers

Narrow SAS permissions make direct-to-storage uploads possible without turning every client into a gallery reader.

Case study 03

Logistics fleet keeps device telemetry append-only

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A logistics fleet sent signed telemetry batches from vehicle gateways to Azure Storage when cellular coverage returned. The original token allowed write and delete, which risked accidental loss of trip evidence.

Business/Technical Objectives
  • Allow gateways to add telemetry without deleting prior blobs.
  • Separate device ingestion rights from analyst read access.
  • Reduce failed uploads caused by missing create permissions.
  • Preserve evidence for accident investigations.
Solution Using SAS permissions

The cloud platform team defined an append-oriented SAS template for gateway ingestion and a separate read-only template for analysts. The ingestion token granted create and write at a narrow path convention, with no list or delete rights. Gateways received blob names from the fleet API so they did not need container enumeration. Azure CLI generated staging tokens for several firmware versions, then ran upload and denied-delete tests. Storage logs were monitored for permission mismatches during rollout, revealing two older gateways that attempted list before upload. Firmware was patched to remove that dependency before production enforcement.

Results & Business Impact
  • Delete-capable device tokens were eliminated across 12,400 gateways.
  • Upload success improved from 91 percent to 98 percent after create permission was added.
  • Accident-evidence retention exceptions dropped to zero in the next quarter.
  • Analyst access reviews separated read workflows from device ingestion cleanly.
Key Takeaway for Glossary Readers

SAS permissions can enforce operational intent, such as append-only ingestion, even when thousands of unmanaged clients touch storage directly.

Why use Azure CLI for this?

As an Azure engineer, I like CLI for SAS permissions because it makes the permission string explicit. Portal checkboxes are useful, but scripts show exactly which letters were granted, which services and resource types were selected, and when the token expires. CLI also lets me generate a token, immediately test the allowed action, and prove that disallowed actions fail. During incidents, this removes guesswork from 403 errors. I can compare a broken token with a known-good one, inspect storage logs, and fix the permission design without exposing account keys in a ticket. That repeatability is essential when multiple teams generate tokens differently.

CLI use cases

  • Generate SAS tokens with exact permission strings and immediately test the allowed operation against a staging container or blob.
  • Compare permission strings for working and failing client workflows to isolate whether the problem is read, write, create, list, or delete access.
  • Export approved SAS permission templates for security review without exposing the token signature itself.

Before you run CLI

  • Confirm tenant, subscription, storage account, container or blob scope, service type, authentication mode, expiry, permissions, and output format.
  • Avoid pasting live SAS tokens into tickets, logs, shell history, or screenshots; the permission string can be reviewed without exposing sig.
  • Check destructive risk from delete or permanent delete permissions, cost risk from write/list operations, and whether user delegation is available.

What output tells you

  • CLI-generated SAS output contains permission, expiry, service, resource type, and signature parameters; the permission letters explain allowed operations.
  • Storage command failures with 403 responses help distinguish missing permission from expired token, wrong key, public network denial, or bad resource scope.
  • Diagnostic output and logs show which operation was attempted, which account or container was targeted, and whether authorization failed after signature validation.

Mapped Azure CLI commands

SAS permission generation and tests

operational
az storage container generate-sas --account-name <storage-account> --name <container> --permissions cw --expiry <utc-expiry> --auth-mode login --as-user --https-only
az storage containersecureStorage
az storage blob generate-sas --account-name <storage-account> --container-name <container> --name <blob> --permissions r --expiry <utc-expiry> --auth-mode login --as-user --https-only
az storage blobsecureStorage
az storage account generate-sas --account-name <storage-account> --services b --resource-types co --permissions rl --expiry <utc-expiry> --https-only
az storage accountsecureStorage
az storage blob upload --account-name <storage-account> --container-name <container> --name <blob> --file <path> --sas-token <sas-token>
az storage bloboperateStorage

Architecture context

Architecturally, SAS permissions belong in a token-issuance model tied to business intent. I do not want developers inventing permission strings per page or pipeline. A broker service should translate known workflows into approved grants: create and write for customer upload, read for export download, add for append-only logs, and list only when browsing is required. The architecture should prefer user delegation SAS where possible, keep token generation behind authenticated application logic, and avoid storing broad SAS URLs permanently. Permissions also need alignment with network restrictions, expiry, stored access policies, and any decision to disable Shared Key access. It prevents drift.

Security

Security impact is direct because SAS permissions decide what a bearer token can do to storage data. A leaked read token can disclose data; a leaked write token can plant malicious files; a leaked delete token can remove business records. Even when expiry is short, overbroad permissions increase blast radius. Secure designs grant only the operation needed, avoid account-level permissions for single-container work, restrict services and resource types, require HTTPS, prefer user delegation SAS, and audit who can generate tokens. Disabling Shared Key access for blob and queue workloads can reduce account-key-signed SAS risk. Reviews should cover token issuers, templates, and emergency revocation paths.

Cost

SAS permissions have indirect cost impact. Broad write permissions can allow unnecessary uploads, duplicated exports, or data growth that raises storage and transaction bills. Broad read and list permissions can drive unplanned egress or scraping if a token leaks. Too-narrow permissions cause failed jobs, repeated transfers, and support time. The FinOps path is simple: permissions control which operations can create, read, move, or delete billable data. Cost-aware teams pair least-privilege SAS templates with storage lifecycle rules, diagnostic logs, and quotas so temporary access does not become uncontrolled consumption. Templates should also prevent avoidable enumeration, abandoned uploads, and accidental data expansion.

Reliability

Reliability impact is direct because missing or mismatched permissions cause storage operations to fail even when network, identity, and expiry are correct. A client that needs list access but only receives read can break navigation. A browser upload that lacks create or write fails at the worst possible moment. Reliable designs test every token against the actual operation set, document permission strings, and include clear 403 handling. They also avoid granting broad rights as a quick fix, because that hides the real failure and creates future security incidents. Stored access policies can help adjust service SAS constraints consistently. Every workflow should have a tested permission profile.

Performance

Performance impact is mostly operational and data-path related. Correct SAS permissions let clients send files directly to Azure Storage instead of routing large payloads through an application proxy, which improves throughput and reduces app-server load. Incorrect permissions create 403 retries, failed chunk uploads, stalled copy jobs, and confusing client backoff. Overbroad list permissions can also encourage expensive enumeration patterns. Teams should test permission strings with realistic file size, concurrency, and retry behavior. The fastest SAS workflow is not the broadest one; it is the narrow token that permits exactly the intended storage calls. Validated templates keep retries and client-side backoff from wasting capacity.

Operations

Operators inspect SAS permissions by reviewing token generation scripts, portal settings, storage logs, and failed request details. They look for the signed permission string, resource scope, service type, expiry, IP range, and protocol. Troubleshooting usually means matching a failed operation to a missing permission letter, not rotating keys blindly. Good operations practice keeps approved permission templates for upload, download, append, migration, and support access. Teams also test that disallowed operations fail, because positive tests alone only prove the token works, not that it is safe. Runbooks should include approved templates, sample denied tests, log queries, and escalation owners for permission mismatches.

Common mistakes

  • Granting read, list, write, and delete for every SAS because it avoids testing the actual client operation path.
  • Forgetting list permission when the application enumerates a container before reading a selected blob, causing confusing partial failures.
  • Treating SAS permissions like Azure RBAC and assuming a role assignment will narrow a token after it has already been signed.