Question 240
An application identity has Blob Data Reader scoped only to one container. It can read blobs, but Azure rejects its request to obtain a user delegation key for creating SAS links. What is the most targeted authorization fix?
Explanation
Correct Answer
Get User Delegation Key is a storage-account-level operation requiring Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action at the storage account, resource group or subscription scope. A container-only data role may authorize reading blobs without permitting that key request. Add a suitable narrowly scoped role such as Storage Blob Delegator at account scope while preserving the existing container data-reader grant. Then issue appropriately limited user delegation SAS tokens and avoid unnecessary account-key access.
Incorrect Answers
Subscription-wide storage management and key handling would exceed the application's need to sign limited Entra-backed tokens. The required delegated key action can be granted more narrowly, for example via Storage Blob Delegator at storage-account scope. Avoid expanding permissions and distributing shared account credentials.
Redundancy controls data replication and availability but has no bearing on whether the caller holds the Azure RBAC action for requesting a user delegation key. The API denial is an authorization scope issue. Assign the correct action at an eligible scope rather than altering storage replication.
Repeating an unchanged container-scoped read role does not grant the storage-account-level generateUserDelegationKey action. The identity may already perform data reads while still lacking permission to request a signing key. Add a suitable role at the correct account-level scope rather than duplicating the data assignment.