You need to use AzCopy to upload a folder from an on-premises client computer to a blob container named `data` in an Azure Storage account named `store1`.
The storage account is configured to restrict network access to selected networks.
You plan to authenticate AzCopy using a Microsoft Entra ID service principal named `AzCopySP`.
Which five actions should you perform in sequence? To answer, arrange the actions in the correct order.
- 1Configure the storage account firewall of `store1` to allow access from the public IP address of the client computer.
- 2Assign the Storage Blob Data Contributor role to the `AzCopySP` service principal at the scope of the `store1` storage account.
- 3On the client computer, set the `AZCOPY_SPA_CLIENT_SECRET` environment variable to the client secret value of the service principal.
- 4On the client computer, run `azcopy login --service-principal --application-id <AppID> --tenant-id <TenantID>`.
- 5On the client computer, run `azcopy copy` specifying the local folder path and the blob container destination URL.
Cevap
To successfully perform the migration, you must first configure the storage account firewall to allow the public IP of the client computer, assign the Storage Blob Data Contributor role to the service principal, configure the `AZCOPY_SPA_CLIENT_SECRET` environment variable on the client, run `azcopy login` with the service principal's credentials, and finally run the `azcopy copy` command.
The correct sequence starts with setting up the infrastructure dependencies: first configuring the storage account firewall to permit traffic from the client's public IP address, and assigning the Storage Blob Data Contributor role to the service principal to authorize data plane actions. Next, on the client side, the environment variable `AZCOPY_SPA_CLIENT_SECRET` must be set because AzCopy does not accept the client secret as a direct parameter. Once the environment variable is configured, running `azcopy login` with the service principal parameters completes the authentication. Finally, executing `azcopy copy` transfers the files securely.
Adım Adım Çözüm
Anahtar Kavram
Configuring non-interactive authentication and network access for secure AzCopy data transfers using Microsoft Entra ID service principals.