Match each access scenario to the SAS or key type that best fits it.
Drag a concept onto its matching description — or click a concept then click the description.
User delegation SAS
Service SAS
Account SAS
Storage account key
Trap 1: Interactive logins: Storage account access keys
Storage account access keys are shared keys that confer full administrative control over the entire storage account, including the ability to read and delete all data, so they completely violate the principle of least privilege for an interactive user login. They cannot be scoped to a single user or operation, do not expire automatically, and are intended only for admin-level account management. In any interactive scenario, a user delegation SAS or Azure AD-based access should be used instead.
Trap 2: Automated backups: User delegation SAS
A user delegation SAS is inherently user-oriented because it is signed with an individual Azure AD user's credentials and expires after a short interval, so it is unsuitable for unattended, recurring backup processes. Automated backups need a credential that can authenticate without a manually signed token and that does not require scheduled rotation, which is exactly what a system-assigned managed identity provides. Relying on a SAS for backups would risk service interruption every time the token expires.
Trap 3: Cross-tenant access: System-assigned managed identity
A system-assigned managed identity is tied to both a single Azure resource and a single Azure AD tenant, so it cannot authenticate to resources in a different tenant where it has no identity or trust relationship. Cross-tenant access depends on a service principal that is explicitly registered and consent-granted in the target tenant, allowing its RBAC assignments to cross tenant boundaries. Managed identities are therefore limited to same-tenant scenarios such as reading storage in the same subscription.
- A
Interactive logins: User delegation SAS
A user delegation SAS is signed with Azure AD credentials rather than a storage account key, meaning it can be issued to an individual user with narrowly scoped permissions and a configurable expiration. This makes it ideal for interactive logins where a human needs temporary, least-privilege access to specific blobs or containers. It requires the calling principal to have the Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey permission.
- B
Automated backups: System-assigned managed identity
Automated backups need to write data continuously without human intervention or the burden of maintaining credentials, and a system-assigned managed identity gives an Azure resource a first-class identity in Azure AD with no secrets to store or rotate. When a backup service or workload uses its own managed identity, it can authenticate to Azure Storage via Azure AD and be granted exactly the RBAC roles needed for backup operations. This is secure and fully automated, unlike key-based or SAS-based approaches.
- C
Cross-tenant access: Service principal with certificate
Cross-tenant access requires an identity that exists outside the context of a single resource's tenant, and a service principal with a certificate provides that independent, strongly authenticated identity. The service principal is registered in the home tenant and can be granted RBAC permissions in another tenant, while the certificate proves the principal's identity without exposing secrets. This is a standard pattern for multi-tenant applications and federated automation scenarios.
- D
Interactive logins: Storage account access keys
Why wrong: Storage account access keys are shared keys that confer full administrative control over the entire storage account, including the ability to read and delete all data, so they completely violate the principle of least privilege for an interactive user login. They cannot be scoped to a single user or operation, do not expire automatically, and are intended only for admin-level account management. In any interactive scenario, a user delegation SAS or Azure AD-based access should be used instead.
- E
Automated backups: User delegation SAS
Why wrong: A user delegation SAS is inherently user-oriented because it is signed with an individual Azure AD user's credentials and expires after a short interval, so it is unsuitable for unattended, recurring backup processes. Automated backups need a credential that can authenticate without a manually signed token and that does not require scheduled rotation, which is exactly what a system-assigned managed identity provides. Relying on a SAS for backups would risk service interruption every time the token expires.
- F
Cross-tenant access: System-assigned managed identity
Why wrong: A system-assigned managed identity is tied to both a single Azure resource and a single Azure AD tenant, so it cannot authenticate to resources in a different tenant where it has no identity or trust relationship. Cross-tenant access depends on a service principal that is explicitly registered and consent-granted in the target tenant, allowing its RBAC assignments to cross tenant boundaries. Managed identities are therefore limited to same-tenant scenarios such as reading storage in the same subscription.