Study guide

4.3 SAS Tokens, Stored Access Policies, and Access Keys

AZ-104 Microsoft Azure Administrator Study Guide Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Orientation and Microsoft Learn Source Control

1.1 Current AZ-104 Exam Facts 1.2 Administrator Role and Candidate Profile 1.3 Skills Outline and Weighted Study Map 1.4 Exam Duration, Question Types, Labs, and Learn Access 1.5 Scoring, Retakes, Renewal, and Account Choice 1.6 Using the Practice Bank, Labs, and Error Log

2 Chapter 2: Identity, RBAC, and Governance Foundations

2.1 Microsoft Entra Users, Groups, and Properties 2.2 Licenses, External Users, and SSPR 2.3 Azure RBAC Built-In Roles and Scopes 2.4 Role Assignment Interpretation and Deny Effects 2.5 Management Groups, Subscriptions, and Resource Groups 2.6 Azure Policy, Locks, Tags, and Governance Controls 2.7 Identity and Governance Case Lab

3 Chapter 3: Subscriptions, Policy, Costs, and Resource Organization

3.1 Subscription Design and Management Groups 3.2 Resource Groups, Lifecycle, and Move Operations 3.3 Tagging Strategy and Cost Allocation 3.4 Budgets, Alerts, and Azure Advisor Cost Recommendations 3.5 Policy, Initiative, Assignment, and Remediation 3.6 Resource Locks, RBAC, Policy, and Tags Combined 3.7 Governance and Cost Case Lab

4 Chapter 4: Storage Accounts, Access, and Data Protection

4.1 Storage Account Design, Redundancy, and Encryption 4.2 Storage Firewalls, Private Access, and Network Rules 4.3 SAS Tokens, Stored Access Policies, and Access Keys 4.4 Identity-Based Access for Azure Files 4.5 Blob Tiers, Lifecycle, Soft Delete, and Versioning 4.6 Azure Files, Snapshots, File Sync, and AzCopy 4.7 Storage Case Lab

5 Chapter 5: Compute, Virtual Machines, Scale Sets, and Bicep

5.1 ARM Templates, Bicep, and Deployment Workflow 5.2 Create, Configure, and Manage Virtual Machines 5.3 VM Disks, Sizes, Encryption, and Host Settings 5.4 Availability Zones, Sets, and VM Scale Sets 5.5 Move VMs Across Resource Groups, Subscriptions, and Regions 5.6 Backup, Restore, and Operational Maintenance for VMs 5.7 VM Compute Case Lab

6 Chapter 6: Containers, App Service, and Platform Compute

6.1 Azure Container Registry and Image Workflow 6.2 Azure Container Instances and Container Apps 6.3 Container Sizing, Scaling, and Environment Choices 6.4 App Service Plan, Apps, and Runtime Configuration 6.5 App Service Certificates, TLS, Custom Domains, and Networking 6.6 App Service Backups, Deployment Slots, and Scaling 6.7 Platform Compute Case Lab

7 Chapter 7: Virtual Networking, Routing, and Secure Access

7.1 VNet, Subnet, and Address Space Design 7.2 VNet Peering and Cross-Network Connectivity 7.3 Public IP Addresses and NAT Patterns 7.4 User-Defined Routes and Effective Routes 7.5 NSGs, ASGs, and Effective Security Rules 7.6 Azure Bastion, Service Endpoints, and Private Endpoints 7.7 Secure Networking Case Lab

8 Chapter 8: Name Resolution, Load Balancing, and Connectivity Troubleshooting

8.1 Azure DNS, Private DNS, and Name Resolution 8.2 Public and Internal Load Balancer Design 8.3 Backend Pools, Health Probes, and Load Balancing Rules 8.4 Load Balancing Troubleshooting Workflow 8.5 Network Watcher: IP Flow, Next Hop, and Connection Troubleshoot 8.6 Hybrid Connectivity, VPN, ExpressRoute, and DNS Considerations 8.7 Connectivity Troubleshooting Case Lab

9 Chapter 9: Monitoring, Alerting, Backup, and Site Recovery

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings 9.2 Log Analytics, KQL, and Operational Queries 9.3 Alert Rules, Action Groups, and Alert Processing Rules 9.4 VM, Storage, and Network Insights 9.5 Recovery Services Vault, Backup Vault, and Backup Policies 9.6 Azure Site Recovery, Failover, and Replication 9.7 Monitoring and Recovery Case Lab

10 Chapter 10: AZ-104 Integration and Troubleshooting Case Labs

10.1 Domain Weight Triage and Study Prioritization 10.2 Identity, Storage, and Compute Integrated Cases 10.3 Networking, Monitoring, and Security Integrated Cases 10.4 Migration, Move, Backup, and Recovery Cases 10.5 Permissions, Network, and Storage Troubleshooting Chain 10.6 Microsoft Learn Lookup Strategy Under Time Pressure 10.7 Full-Domain Case Lab

11 Chapter 11: Final Review, Exam Experience, Renewal, and Career Path

11.1 Final Two-Week Study Plan 11.2 Hands-On Lab Checklist and Command Review 11.3 Exam Day, Pearson VUE, Breaks, and Learn Access 11.4 Retake Plan, Score Report, and Weak-Domain Repair 11.5 Renewal Assessment and Annual Certification Maintenance 11.6 After AZ-104: AZ-305, AZ-400, SC-500, and Job Paths

4.3 SAS Tokens, Stored Access Policies, and Access Keys

Key Takeaways Explain This Topic AI

Shared access signatures delegate limited data-plane access and should be scoped by permissions, resource, IP range, protocol, and time.

User delegation SAS for Blob Storage is backed by Microsoft Entra credentials and is usually preferred over account-key SAS when possible.

Stored access policies centralize expiry and revocation for service SAS on supported resources.

Account access keys are powerful shared secrets, so rotation, Key Vault storage, and disabling shared key access are important controls.

Troubleshooting SAS failures requires checking time windows, permissions, resource type, signed service, protocol, IP restrictions, and key validity.

Last updated: May 2026

Delegating access without overexposing the account

Azure Storage supports several access patterns: Microsoft Entra authorization with Azure RBAC, shared key authorization, shared access signatures, and anonymous public access when allowed for blob containers. For administrator scenarios, the key decision is whether a user or application should receive identity-based permission, a temporary delegated token, or a shared account secret. The safest answer is usually the most specific permission for the shortest workable time.

A shared access signature, or SAS, is a signed URI query string that grants access to storage resources. A service SAS delegates access to a specific service resource, such as a blob container or file share, and is signed with an account key. An account SAS can delegate access across services and resource types and is also signed with an account key. A user delegation SAS applies to Blob Storage and is signed using a user delegation key obtained through Microsoft Entra ID. In many exam scenarios, user delegation SAS is preferred because it avoids directly using the account key.

Method Scope Credential basis Typical use Main risk

Azure RBAC data role Identity and scope Microsoft Entra ID Ongoing user or app access Role too broad or wrong scope

User delegation SAS Blob resources Microsoft Entra user delegation key Temporary blob access Token leakage until expiry

Service SAS Single service resource Storage account key Temporary access to blob, file, queue, or table Depends on shared key

  • Account SAS Services and resource types Storage account key Cross-service tool access Broad delegated access
  • Account access key Entire account Shared secret Legacy apps or admin break glass Full control if leaked

SAS permissions are compact but important. For blobs, common permissions include read, add, create, write, delete, list, and sometimes permanent delete depending on feature support. Resource scope matters: a token for a container with list and read is very different from a token for one blob with read only. Set HTTPS-only where possible. Add a start time only when necessary, because client clock skew can make a token invalid before it appears active. A common operational practice is to set the start time a few minutes in the past or omit it for immediate use, while keeping the expiry short.

Stored access policies give you a named policy on a container, queue, table, or file share that can define start time, expiry time, and permissions for service SAS tokens. The advantage is revocation and centralized change. If many SAS tokens reference the policy and you shorten the policy expiry or delete the policy, those tokens are affected. A user delegation SAS and account SAS do not use stored access policies in the same way, so read the scenario carefully.

Portal path example: Storage account > Data storage > Containers > select container > Shared access tokens for a container-level SAS. For account-level SAS, use Storage account > Security + networking > Shared access signature. For keys, use Storage account > Security + networking > Access keys. For a stored access policy, open the container or share, then Access policy.

  • CLI examples: az storage container policy create \
  • -account-name staz104prod01 \
  • -container-name reports \
  • -name readonly-2h \
  • -permissions rl \
  • -expiry 2026-05-05T22:00Z \
  • -auth-mode login
  • az storage container generate-sas \
  • -account-name staz104prod01 \
  • -name reports \
  • -policy-name readonly-2h \
  • -https-only \
  • -as-user

The exact CLI parameters depend on the SAS type and command version, but the administrator logic stays the same: define the resource, permissions, expiry, protocol, optional IP range, and signing method. For automation, avoid printing long-lived SAS values into logs. Store secrets in Key Vault when a workflow must reuse them. Prefer managed identities and RBAC for Azure-hosted applications when possible, because the app can obtain tokens without embedding a storage key or SAS in configuration.

Access keys require special care. Each storage account has two account keys so you can rotate one while applications use the other. A common rotation sequence is: identify apps using key1, update apps to key2 or a Key Vault reference, regenerate key1, move apps to key1, regenerate key2, and confirm no stale clients remain. If the organization disables shared key access on the storage account, clients must use Microsoft Entra authorization or supported SAS patterns. This can break tools or legacy applications that silently depend on keys.

Troubleshooting SAS problems is systematic. If a SAS worked yesterday but fails today, check expiry first. If list operations fail but direct blob reads work, the token may have read but not list. If uploads fail, confirm write or create permissions and that the signed resource type matches the operation. If a token fails only from a corporate network or only from home, check the SAS IP range and storage firewall. If every key-signed SAS fails after a security change, check whether the account key was regenerated or shared key access was disabled.

Case scenario: a vendor needs to upload one CSV file into a landing container by Friday, but must not list other files or reuse access next month. A good answer is a short-lived SAS scoped to the target container or blob path with only create and write as needed, HTTPS-only, optional IP restriction if the vendor has stable egress, and storage firewall rules that still allow the network path. Do not give the vendor an account key. Do not assign subscription Contributor. If revocation before expiry is required for many similar tokens, use a service SAS tied to a stored access policy where supported.