A company is migrating a dataset from an on-premises file share to an Azure storage account named stcopydestination. You have been tasked with performing the migration. The security team has configured stcopydestination to reject all shared key authentication requests. You authenticate to Azure via the command line using azcopy login. When you run the command to copy the files to a blob container, you receive an error indicating that the request is not authorized. Your user account currently has the Owner role for the subscription. How should you resolve the authorization issue?
- Grant the Storage Blob Data Contributor role to your user account.Cevap
- BGrant the Reader role to your user account at the storage account level.
- CGenerate an account-level Shared Access Signature (SAS) token with a short expiration period and append it to the destination container URL.
- DEnable the exception for trusted Microsoft services in the storage account firewalls and virtual networks settings.
Cevap
Grant the Storage Blob Data Contributor role to your user account.
The correct answer is to grant the Storage Blob Data Contributor role to your user account. When a storage account is configured to reject shared key authentication, access via account keys and standard SAS tokens is disabled. Data operations must be authorized using Microsoft Entra ID. Because the subscription Owner role only provides control-plane access, it does not grant permissions to write blob data when using Entra ID. Therefore, the Storage Blob Data Contributor role must be explicitly assigned to the user's account to allow the AzCopy upload operation.
Adım Adım Çözüm
Anahtar Kavram
Azure Storage separates control plane and data plane RBAC roles, and disabling Shared Key access requires the use of Microsoft Entra ID roles (such as Storage Blob Data Contributor) for data operations.