AZCopy - The server returned an error: (407) Proxy Authentication Required

less than 1 minute read

AZCOPY is a great little tool for copying and manipulating azure storage. You can find more information about it here

Behind a proxy in a corporate firewall, I get this error.

Usually I add the following to my powershell command before running them

[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

But that gave me the error:

[ERROR] Error parsing destination location : The remote server returned an error: (407) Proxy Authentication Required.

Create config file for AZCopy

I couldn’t find a config file for azcopy. So I created the config file in the location of azcopy (C:\Program Files (x86\Microsoft SDKs\azure\azcopy)

New-Item C:\Program Files (x86\Microsoft SDKs\azure\azcopy\AzCopy.exe.config -type file

Then add the follwoing into the config file:

     <defaultProxy enabled="true" useDefaultCredentials="true">

Magic! :-)