Introduction
When downloading installers or binaries that are referenced from https://go.microsoft.com, it is important to understand that these URLs do not host the files directly. Instead, they act as redirectors to the actual content hosted on https://download.microsoft.com.
Artifactory Generic Remote repositories do not support redirect-style downloads. When working with Generic repositories (and tools such as curl), Artifactory requires the full, resolved path to the artifact and does not automatically follow upstream HTTP redirects. As a result, attempting to proxy downloads directly from go.microsoft.com via a Generic Remote repository will fail.
For example, running the following command directly against the Microsoft URL:
curl https://go.microsoft.com/fwlink/?linkid=2318101 -vvv
Shows that Microsoft responds with an HTTP redirect. The request is ultimately redirected to the following final URL:
https://download.microsoft.com/download/b5865bb8-7bc6-4068-9c1d-fb77c256a865/amd64/1033/msoledbsql.msi
This means that the actual file is not downloaded from go.microsoft.com, but from download.microsoft.com.
Resolution
To successfully proxy Microsoft downloads through Artifactory, the Generic Remote repository should be configured to point directly to the final content host:
https://download.microsoft.com/
Once the Generic Remote repository is configured, the artifact can be downloaded through Artifactory by providing the full path to the file:
curl -u username:password http://ART_URL/artifactory/microsoft-generic-remote/download/b5865bb8-7bc6-4068-9c1d-fb77c256a865/amd64/1033/msoledbsql.msi -vvv
With this approach, the download succeeds, and we can see the artifact cached successfully in the corresponding remote-cache repository: