Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
I understand that you trying to copy files from an Azure File Share to a Blob container within the same storage account, using a containerized Azure Durable Functions app authenticated via a user-assigned managed identity (UAMI) by using azcopy command however getting error as <CannotVerifyCopySource>
This indicates that the Azure Storage service at the destination is unable to authenticate or authorize access to the source blob. Even with public access on the source blob, the copy operation itself still requires proper authorization from the destination's perspective.
It may works locally because AzCopy uses your interactive login context, which has full access and can generate the necessary headers but while running inside a containerized Azure Function using UAMI, AzCopy relies on MSI-based token acquisition & the source file share that may not be accessible due to network restrictions or missing role assignments
Solution:
Grant the managed identity "Storage Blob Data Contributor" role to the UAMI at both the source and destination storage account levels. "The Data Reader" role may not be sufficient for copy operations.
In the Azure portal, go to the source storage account and check the "Firewalls and virtual networks" settings. Ensure that the "Allow Azure services on the services list to access this storage account" option is enabled. This allows services within Azure (like the destination storage account's copy operation) to access the source. If there are specific network restrictions, you might need to add the virtual network or IP address of the service performing the copy to the allowed list, since you're using a managed identity, allowing Azure services is usually the better option.
If Private Link is enabled, you might need to allow public access to the source storage account in addition to use the managed identity. This is because the copy operation might be initiated from a service that doesn't use the private endpoint.
Ensure both services are in the same virtual network.
Try a very simple copy operation (e.g., copying a small text file) to isolate the issue. This can help determine the problem specifically.
If you find this comment helpful, please “up-vote” for the information provided , this can be beneficial to community members.
Kindly let us know if you have any additional questions.
Thanks