An Azure service that stores unstructured data in the cloud as blobs.
Hello Frederick Chang,
Thank you for your question!
The 403 AuthorizationFailure error indicates that the azcopy operation is being blocked, likely due to insufficient permissions or network restrictions, even though the user is a Storage Blob Data Contributor and the VM's IP is whitelisted. Since the container is in a different resource group from the VM, the issue might stem from cross-resource group access policies, network rules, or azcopy configuration.Ensure the Storage Blob Data Contributor role is assigned at the appropriate scope (e.g., storage account, resource group, or subscription level) for the storage account aksnfskekulai in the test_aks resource group.
The storage account’s network rules show defaultAction: Deny with specific IP whitelisting (57.154.55.229, 70.95.68.176) and a virtual network rule. Confirm the VM’s public IP matches one of the whitelisted IPs. You ran curl ifconfig.me, but the output is not visible in your query. Re-run and verify else
- Navigate to Virtual Machines.
- Search for and select the VM (testkuberay).
- In the Overview pane, note the Public IP address. If no public IP is assigned, ensure the VM is using a public IP or is in the allowed VNet/subnet (aks-subnet).
Verify Storage Blob Data Contributor Role
- go to Storage Accounts.
- Search for and select the storage account aksnfskekulai in the test_aks resource group.
Access Control (IAM):
- In the storage account’s left-hand menu, click Access Control (IAM).
- Click Role assignments tab.
- Search for the user or service principal used with azcopy login (e.g., the user tied to azcopy login --tenant-id).
- Confirm the user has the Storage Blob Data Contributor role assigned at the storage account or resource group level.
- If not assigned, proceed to add the role.
Firewall and Virtual Networks:
- In the storage account (aksnfskekulai), go to Networking in the left-hand menu.
- Select the Firewalls and virtual networks tab. Confirm the Public network access is set to Enabled from selected virtual networks and IP addresses.
- Under Firewall, check the Address range section for the allowed IPs (57.154.55.229, 70.95.68.176). Under Virtual networks, confirm the VNet (aks-vnet-18627786) and subnet (aks-subnet) are listed.
Add VM’s Public IP (if not whitelisted):
- If the VM’s public IP (from Step 1) is not listed, scroll to the Firewall section.
- Click + Add IP address or + Add IP address range.
- Enter the VM’s public IP (e.g., <vm-public-ip>).
- Click Save.
- Wait a few minutes for the network rule to take effect.
Note- Your azcopy version (10.28.1) is outdated. Update to the latest version (10.29.0 or newer) to avoid potential bugs:
wget https://aka.ms/downloadazcopy-v10-linux
tar -xvf downloadazcopy-v10-linux
sudo cp ./azcopy_linux_amd64_*/azcopy /usr/bin/
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.