ML Workspace 401 pulling model/environment from ML Registry

Phillip Stenger 10 Reputation points
2026-08-14T13:41:52.6466667+00:00

I am trying to deploy an online endpoint using a model/environment from an ML Registry. The deployment is failing and in the logs I am seeing 401 errors. The online endpoint is using a user assigned id which I have verified has AzureML Registry User role. It seems like maybe a networking issue, but I'm not sure. The ACR backing the registry has public access enabled as does the registry itself, though the registry does have a private endpoint configured. Not sure if that matters.

Kind: Pod, Name: ImagePullFailed, Type: Warning, Time: 2026-08-14T00:19:57.025589Z, Message: Image pull failed, retrying. Please check image-fetcher log for detail.
Kind: Pod, Name: DownloadFailed, Type: Warning, Time: 2026-08-14T00:20:10.550807Z, Message: Model download failed, retrying. Please check storage-initializer log for detail.
Kind: Pod, Name: Pulling, Type: Normal, Time: 2026-08-14T00:20:13.724089Z, Message: Start pulling container image
Kind: Pod, Name: DownloadFailed, Type: Warning, Time: 2026-08-14T00:20:21.557221Z, Message: Model download failed, retrying. Please check storage-initializer log for detail.
Kind: Pod, Name: Downloading, Type: Normal, Time: 2026-08-14T00:20:35.694766Z, Message: Startdownloading models

Container logs:
+ '[' '!' -S /run/containerd/containerd.sock ']'
+ ./mir-imagefetcher
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:131","msg":"Use environment: AzurePublicCloud"}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:157","msg":"Parse image name","ImageUrl":"b7869157b0a.azurecr.io/azureml/30aa9c9f-f60e-5330-b189-17a6f8fa1499/statements:11","repo":"b7869157b0a.azurecr.io/azureml/30aa9c9f-f60e-5330-b189-17a6f8fa1499/statements","tag":"11","digest":""}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:290","msg":"Start getting image credential","ImageUrl":"b7869157b0a.azurecr.io/azureml/30aa9c9f-f60e-5330-b189-17a6f8fa1499/statements:11"}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:320","msg":"Found user ACR image","ImageUrl":"b7869157b0a.azurecr.io/azureml/30aa9c9f-f60e-5330-b189-17a6f8fa1499/statements:11","IdentityType":"XDS"}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:454","msg":"Request parameters","Registry":"b7869157b0a.azurecr.io","clientid":"f831ae94-ac82-435f-96e2-e5e88c20c870"}
{"level":"[WARN]","ts":"Aug  14 00:20:13","logger":"VMAgent","caller":"common/http_util.go:197","msg":"Http status code of response is not 2xx","HTTP status code":401}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:509","msg":"Get challenge header","registry":"b7869157b0a.azurecr.io","Www-Authenticate":"Bearer realm=\https://b7869157b0a.azurecr.io/oauth2/token\,service=\"b7869157b0a.azurecr.io\""}
{"level":"[INFO]","ts":"Aug  14 00:20:13","logger":"VMAgent.ImageFetcher","caller":"imagefetcher/image_fetcher.go:514","msg":"Update login server","registry":"b7869157b0a.azurecr.io","service":"b7869157b0a.azurecr.io"}
{"level":"[WARN]","ts":"Aug  14 00:20:13","logger":"VMAgent","caller":"common/http_util.go:197","msg":"Http status code of response is not 2xx","HTTP status code":401}
{"level":"[WARN]","ts":"Aug  14 00:20:15","logger":"VMAgent","caller":"common/code_util.go:75","msg":"After attempt # 1, got error: exchange refresh token return non-success status: 401, details: "}

Azure Machine Learning

2 answers

Sort by: Most helpful
  1. Phillip Stenger 10 Reputation points
    2026-08-14T13:58:40.91+00:00

    I am unable to add roles to the storage/acr which back the ML Registry as they are Microsoft managed. I am getting this error if I try: "The client *** with object id *** has permission to perform action *** on scope *** however the access is denied because of the deny assignment with name 'Azure machine learning services user RG access denier"

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-08-14T13:42:12.4066667+00:00

    A 401 during image pull and model download in an online endpoint usually points to an authorization problem first, with networking as a secondary possibility.

    Based on the failure details:

    1. The image pull path is failing at registry token exchange.
      • The log shows exchange refresh token return non-success status: 401.
      • For online deployments, Azure uses managed identities to access the container registry and storage.
      • When the endpoint uses a user-assigned identity, that identity must have the required permissions on the backing resources.
    2. For the container image pull, verify the user-assigned identity has AcrPull on the container registry that stores the environment image.
      • The documented requirement for user-assigned identity is AcrPull on the workspace container registry.
      • A registry-specific role such as AzureML Registry User is not sufficient for ACR image pull by itself.
    3. For the model download, verify the same identity has the required storage access.
      • The documented requirement is Storage blob data reader on the workspace storage account.
      • If MDC is enabled, the requirement changes to Storage Blob Data Contributor.
    4. Check whether the model and environment artifacts are actually reachable.
      • Get deployment logs:
             az ml online-deployment get-logs -e <endpoint-name> -n <deployment-name> -l 100
        
      • If model download is failing, verify the model exists in the workspace and check the storage initializer logs:
             az ml model show --name <model-name> --version <version>
        
             az ml online-deployment get-logs --endpoint-name <endpoint-name> --name <deployment-name> –container storage-initializer
        
    5. Networking can also cause this if the registry is private or otherwise inaccessible.
      • The documentation calls out container registry authorization failures when the registry cannot be accessed with the current credentials.
      • If the registry is behind a virtual network or private endpoint, verify that the virtual network is set up properly.
      • If using legacy network isolation for managed online endpoints, image download failures are expected when public egress is disabled and the registry visibility is private.
    6. If the endpoint was created with system-assigned identity instead, RBAC is granted automatically. For user-assigned identity, the role assignments must be added manually.
    7. If the image is not in the expected registry or tag, verify it exists:
         az acr repository show-tags -n <acr-name> --repository <repository-name> --orderby time_desc --output table
      

    Most likely fix for this case:

    • Add AcrPull to the user-assigned identity on the ACR that backs the environment image.
    • Add Storage blob data reader on the storage account that holds the model artifacts.
    • If private endpoint or VNet routing is involved, validate that the endpoint can reach the registry and storage paths.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.